[antlr-interest] Bug in generation code

Gavin Lambert antlr at mirality.co.nz
Thu Oct 11 12:16:45 PDT 2007


At 04:52 11/10/2007, Johannes Luber wrote:
 >The problem is with this line:
 >
 >( modifier=('protected'|'public'|'private'|'fragment') )?
 >
 >While the strings are recognized correctly, they aren't set as
 >value to modifier. In other words, 'fragment' is simply 
swallowed.
 >I suppose this is a problem with Java.stg. Or is the source
 >somewhere else?

You can work around this by making it a subrule.

Also, you've defined a "tokens" entry for FRAGMENT, so you should 
probably be using that instead of repeating the string.



More information about the antlr-interest mailing list