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 <[email protected]>:
> 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

List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to