There is a throwsSpec in the ANTLR tool grammar that *should* be able to be used like this:
my_rule /*returns [Object o]*/ throws RecognitionException, OperationCanceledException : ... ; It doesn't apply to C# so it's not implemented in my CSharp3 target. Sam -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Peter C. Chapin Sent: Tuesday, January 13, 2009 6:13 AM Cc: antlr-interest Subject: Re: [antlr-interest] Passing user defined exceptions through the parser. Laurent Caillette wrote: > This should work if you make OperationCanceledException a subclass of > RecognitionException, which is a checked exception thrown by parser's > methods. Then the catch clause does its job. > Okay, thanks. That's a little unsatisfying because the exception in question really isn't a problem with recognition. Still, I can live with that. I guess that's life with Java. Peter List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address 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 -~----------~----~----~----~------~----~------~--~---
