[antlr-interest] antlrworks "NoViableAlt" exception

Mike Lischke mike at lischke-online.de
Thu Nov 8 04:14:45 PST 2012


> 
>> if you are building trees, then I would use real tokens in the lexer and
>> not 'literals' in the parser.
>> 


Because literals in the parser (i.e. string constants used in parser rules) get a random lexer token id, which are hard to recognize when you walk your tree. By using lexer rules to name your tokens you know the ids.

Mike
-- 
www.soft-gems.net




More information about the antlr-interest mailing list