[antlr-interest] Creating tokens on error
Marko Simovic
markobarko at gmail.com
Sun Apr 6 10:41:41 PDT 2008
If I have a parser rule for addition that looks like this:
sum : something (Plus^ something)*;
it works fine for input like:
a+b
however, if I have input such as:
a+
which is invalid syntax (and causes a NoViableAltException), I would like
the parser to generate a "placeholder" token for the missing operand. Is
this possible?
Thanks,
Marko
More information about the antlr-interest
mailing list