[antlr-interest] Java Keywords and Rule-Naming conflicts
martin.kohl at gmail.com
Sat Aug 25 03:50:24 PDT 2007
Hi again :)
Not sure that this is an actual bug, I had a parser rule called goto in my
grammar. Now the ExprParser.java has a method called goto(), however as goto
is a java keyword it cannot be used to name methods or instances, which
turns up as an error when trying to compile the java source.
Obviously, the problem can be resolved by renaming the rule goto to
something less controversial. I was thinking it might be an idea to compare
rule names with keywords of the target language prior to generating the java
files, alternatively, just leave it up to the user to figure out ;)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the antlr-interest