Hi,
I would like Antlr to fail upon any error, instead of trying to recover. I've managed to do this for almost all types of errors, following the directives in the reference, but for some reason if there is an illegal input termination, Antlr won't report an error for it. That is, If we've got the input: LegalStatement1, LegalStatement2, ... LegalStatementN, IllegalStatement, Antlr would stop on LegalStatementN, Instead of reporting an error for IllegalStatement. Following are all the steps I took to achieve the bail-upon-any-error behavior: 1. Overriding NextToken method of the lexer, so it would always throw an exception 2. Overriding methods Mismatch and RecoverFromMismatchedSet of the parser, so they would always throw an exception 3. Adding @parser::rulecatch directive, so a RecognitionException would always be thrown. So, what did I miss? I would really appreciate any help, Vitaliy --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "il-antlr-interest" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en -~----------~----~----~----~------~----~------~--~---
List: http://www.antlr.org:8080/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org:8080/mailman/options/antlr-interest/your-email-address
