antlr / grammars-v4

Grammars written for ANTLR v4; expectation that the grammars are free of actions.
MIT License
10.22k stars 3.71k forks source link

Add license for HTTP grammar #4237

Closed Marti2203 closed 1 month ago

Marti2203 commented 2 months ago

I had made a simple HTTP grammar a couple of years ago and at that time the rules for license inclusion were not well defined. I was recently contacted to remediate this.

kaby76 commented 2 months ago

Looks like a regression for the tester. I will need to fix this before we can redo the tests.

kaby76 commented 2 months ago

This grammar just does not work. https://github.com/antlr/grammars-v4/issues/4244

The grammar didn't have a proper EOF-terminated start rule. This caused the parser to "accept" the two inputs (test.http and testHeader.http). But, the parse trees were empty. By design, Antlr rewinds the parser to an acceptable state before an error. In addition, no errors are reported. Note, the tester trgen doesn't test the input, but maybe the old "mvn test" tester did?

Marti2203 commented 2 months ago

Hi, I will fix it then. Unfortunately, I really do not remember from 5 years ago, so I will spend some time fixing it and make the grammar a better shape.

kaby76 commented 2 months ago

Much appreciated. It's going to take some time to fix trgen and add regression tests so the build doesn't break too often.

kaby76 commented 1 month ago

@Marti2203 Could you synch with the latest in master? The updates for build regressions should fix the build for this PR. Thanks!

teverett commented 1 month ago

@Marti2203 thanks