Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

antlr3 template generating wrong code #127

Open
IRebo opened this issue Mar 19, 2020 · 2 comments
Open

antlr3 template generating wrong code #127

IRebo opened this issue Mar 19, 2020 · 2 comments

Comments

@IRebo
Copy link

IRebo commented Mar 19, 2020

Hi,

i was trying to upgrade our project from older antlr 3.4 to the latest 3.5 (tried various version including the latest 3.5.2-rc1) but I keep getting a compilation error of the produced .cs file.

I have found traces of other people running into the same issue and they can describe it better then me :)
https://stackoverflow.com/questions/9923639/antlr-grammar-generating-invalid-c-sharp-code
https://www.antlr3.org/pipermail/antlr-interest/2012-February/044153.html

But the solution suggested (setting ASTLabelType to StringTemplate) doesnt make much sense as ASTLabelType should be of the AST type.

I have attached a minimal solution for easier diagnosing.

@IRebo
Copy link
Author

IRebo commented Jun 1, 2020

antlr_test.zip

@IRebo
Copy link
Author

IRebo commented Oct 26, 2021

curiously i found a solution discussed back in 2011 if anyone else runs into it - https://raw.githubusercontent.com/antlr/website-antlr3/aa6181595356409f8dc624e54715f56bd10707a8/pipermail/antlr-interest/2011-September/042586.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant