[antlr-interest] Request option to check for undefined tokens in tree grammar, Antlr 3.0

Hardy, Stephen Stephen_Hardy at rabbit.com
Wed Aug 1 13:14:33 PDT 2007


I made a typo in my tree grammar where a token was misspelt.
Unfortunately, ANTLR happily added that never-to-be-used token to the
list, so no error was flagged and it took a little time to track down
the error.

Would it be possible to add an option to a tree grammar to make Antlr
issue a warning if tokens were defined but not defined in the *.tokens
file?  I would recommend enabling the warning by default, since most
users (I think) would not want to define additional tokens in the tree
grammar which weren't in the parser grammar.

Regards,
SJH


More information about the antlr-interest mailing list