[antlr-interest] bug? missing lexical token not reported as error

Maurizio de Pascale mdepascale at dii.unisi.it
Sat Dec 16 06:18:24 PST 2006


Hi,
it looks like that if a parser rules uses an undefined lexical token no 
error is reported by antlr... but it throws at runtime...
for example a rule like:

startRule : (SOME_THING)* EOF;

where SOMETHING is a valid token for the lexer (in the same grammar 
file) but SOME_THING doesn't exist, gets translated with no reported error.
Is this a bug or am I missing something?

using ANTLR 2.7.7 (20060930) with C++ output.

Maurizio de Pascale
mdepascale at dii.unisi.it


More information about the antlr-interest mailing list