[antlr-interest] Combined grammars behave differently than separate parser/lexer grammars

Stevenson, Todd (GE Healthcare) Todd.T.Stevenson at ge.com
Mon May 17 10:34:18 PDT 2010


I recently split a combined grammar that I had built into separate
parser and lexer grammars.  I noticed  that in the combined grammar when
I attempt to reference an undefined token, Antlr throws an error.
However, after I split this grammar into separate lexer and parser
grammars, Antlr allowed me to reference lexer tokens in the parser
grammar not defined by the lexer grammar.  These become very difficult
to debug.   Am I missing something, or is the the correct behavior?
 
thanks.
 
 


More information about the antlr-interest mailing list