[antlr-interest] (no subject)
Abhijit Nandkumar Ghonge
Abhijit_Ghonge at infosys.com
Mon Oct 9 06:15:54 PDT 2006
The RecognitionException does require the token to be passed as
argument. But there is no method as to get the token, just as we have
getColumn() and getLine() methods on RecognitionException object.
Its ok I may extract it from localized message of
On 9. Oct 2006, at 11:58 Uhr, Abhijit Nandkumar Ghonge wrote:
> Can anybody help me with this: How can I extract token from any of
> the exceptions - RecognitionException, TokenStreamException and
> CharStreamException etc? Or do I have to extract it from the exception
For ANTLR v2 I don't think the token is stored in the exceptions,
unfortunately. You might have to extract it manually.
In v3 the token itself is passed to the exception making the whole thing
a lot easier.
**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use of the addressee(s). If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful. This e-mail may contain viruses. Infosys has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. You should carry out your own virus checks before opening the e-mail or attachment. Infosys reserves the right to monitor and review the content of all messages sent to or from this e-mail address. Messages sent to or from this e-mail address may be stored on the Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the antlr-interest