[antlr-interest] ANTLR tree construction problem
Johannes Luber
jaluber at gmx.de
Tue Mar 11 10:54:59 PDT 2008
Kenneth Domino schrieb:
> Hi,
>
> I'm working with the example grammar ANTLRv3.g
> (http://fisheye2.cenqua.com/browse/antlr-examples/java/ANTLR/ANTLRv3.g?r=4288)
>
> and it looks like either the label handling in the generated parser is
> not correct. This seems to be exposed with modifiers (e.g.,
> "fragment"), where the code uses the label "modifier" for a Token from
> a set of string literals in the grammar. The code in question is:
This is a known problem. There is an easy workaround though - just
extract the subrule, which you want to label.
Johannes
More information about the antlr-interest
mailing list