Hi again, Is this an obvious question? I did not find any references to it in the documentation. Could anybody please shed some light upon the issue?
Thanks allot, Vitaliy From: Vitaliy Sent: Wednesday, October 29, 2008 14:05 To: ANTLR-Interest Interest Subject: Error handeling - Illigal input termination 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 __________ Information from ESET NOD32 Antivirus, version of virus signature database 3565 (20081029) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com __________ Information from ESET NOD32 Antivirus, version of virus signature database 3568 (20081030) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com __________ Information from ESET NOD32 Antivirus, version of virus signature database 3575 (20081031) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com --~--~---------~--~----~------------~-------~--~----~ 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
