[antlr-interest] How to force ANTLR 3.1.2 to raise exceptions on invalid tokens?

Liviu U liviu.u at gmail.com
Thu Jun 4 02:45:43 PDT 2009


I notices something strange in 3.1.2

If i have a rule:  var x = int; and another that matches: if cond then
statements end

for a script:

if var x=3 ....

ANTLR ignores the if and parses an assignment. This is not what i
expect. I need to have an error raised.

Is there a way to configure the behaviour i expect? I remember that in
older versions the behavior of the parser was different...


More information about the antlr-interest mailing list