[antlr-interest] ANTLR parsing too lazy

Marco Bakera marco.bakera at tu-dortmund.de
Mon Dec 17 02:50:20 PST 2007


Hey everybody,

It seem that the parser that I use for parsing mathematical expressions 
accepts inputs like 

'(a & b))' 

although there is no rule for the second closing parenthesis. This expression 
will be parsed into a syntax tree like the following

&
+- a
\- b

Whatever follows '( a & b)' will be ignored since no rules matches. 

How can I manage to let antlr throw an exception when the input reaches a 
place where no rule matches?

Thanks for any kind of help.

Greetings,
Marco.


More information about the antlr-interest mailing list