[antlr-interest] Token
Kay Roepke
kroepke at classdump.org
Mon Oct 9 05:03:48 PDT 2006
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
> string?
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.
-k
More information about the antlr-interest
mailing list