tunnelvisionlabs / antlr4

The highly-optimized fork of ANTLR 4 (see README)
Other
73 stars 12 forks source link

Compiler errors related to CAP#1 #42

Closed waterguo closed 5 years ago

waterguo commented 5 years ago

Hi,

I am experimenting with the tunnelvisionlabs fork but met a lots of compilation errors related to "CAP#1". The errors come from my code in which I reference the context objects generated by antlr such as "Update_stmt_setContext".

I am using version 4.5. Is tunnelvisionlabs fork 100% compatible with original antlr4? Should I try a different version?

Please advise, thanks water

sharwell commented 5 years ago

I am using version 4.5. Is tunnelvisionlabs fork 100% compatible with original antlr4? Should I try a different version?

No, there are a few changes. The strong compatibility policy of this fork relates to previous versions of this fork. Over time, the reference runtime has deviated from it in a few ways where I avoided making breaking API changes. However, the underlying functionality should all be available.

I would need to see some examples to give more specific feedback.

waterguo commented 5 years ago

You can find my experiment branch at https://github.com/waterguo/antsdb/tree/wg_antlr My antlr4 syntax file can be found at https://github.com/waterguo/antsdb/blob/wg_antlr/fish-server/src/main/antlr4/com/antsdb/saltedfish/lexer/Mysql.g4 When I try to compile my project using "mvn clean compile", there are lots of compilation errors after I switched over to tunnelversionlabs version of antlr4.

I found lots of errors are caused by something like List<? extends Cascade_optionContext> in the generated code. In the original version of antlr, it is generated as List<extends Cascade_optionContext>

sharwell commented 5 years ago

@waterguo I sent you a pull request: https://github.com/waterguo/antsdb/pull/12

sharwell commented 5 years ago

@waterguo The differences I found for that pull request all appear to be intentional. I'm going to mark this as by design / won't fix. Please feel free to open a new issue if you find additional cases that are problems.