Skip to content

antlr3 template generating wrong code #127

@IRebo

Description

@IRebo

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions