[antlr-interest] Couldn't disable RecognitionException

Marwan Ajraoui marwan.alephn at gmail.com
Mon Aug 17 00:05:30 PDT 2009


Add to your rulecatch System.exit(1); That wiill look like:

@rulecatch {

catch (RecognitionException e) {

    //throw e;
   System.exit(1)

}

2009/8/16 Ha Luong <haluongvn at gmail.com>:
> Dear all,
>
> I'd like to catch the RecognitionException object and exit the Recognizer
> upon First Error. I tried to use Bail.g in antlr code examples, and disable
> "throw e" in it. The error doesn't print to Output of ANTLRWorks v1.2.3 but
> print to console command (cygwin). I attached Bail.g, TestBail.java and
> input files. Could you please help me?
>
> Thank you very much,
> Ha Luong
>
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe:
> http://www.antlr.org/mailman/options/antlr-interest/your-email-address
>
>



-- 
Marouane


More information about the antlr-interest mailing list