[antlr-interest] Disabling error recovery in antlr

NeoPhyte 20neophyte08 at gmail.com
Mon Apr 18 04:56:40 PDT 2011


I need my ANTLR grammar to stop processing the current input(without an
exception), if it encounters an error. Under my current implementation the
grammar, instead of processing the next input(on encountering an error in
the current one) shows exception and stops the processing. 

For example

what I want is -

i/p-first_input(incorrect)
o/p-failed parsing

i/p-second_input(correct)
o/p-parsing succeeds

i/p-third input(incorrect)
o/p-failed parsing

...and so on

Currently what happens is-

i/p-first_input(incorrect)
o/p-failed parsing
exception occurs...stops further processing of inputs

How to achieve this in my grammar.??

--
View this message in context: http://antlr.1301665.n2.nabble.com/Disabling-error-recovery-in-antlr-tp6283357p6283357.html
Sent from the ANTLR mailing list archive at Nabble.com.


More information about the antlr-interest mailing list