[antlr-interest] Antlr exceptions
Terence Parr
parrt at cs.usfca.edu
Wed Mar 10 10:26:33 PST 2004
On Mar 10, 2004, at 7:26 AM, Donovan, Bob wrote:
> Hi,
>
> In my parser, I am collecting all errors generated from the parser so
> that I can present them in a view after the parse is complete. I have
> extended the CommonToken class with an ExtentToken tracks columns,
> rows, etc of each token.
>
> I noticed that only the MismatchedTokenException and the
> NoViableAltException have a variable that holds a token:
> public antlr.Token token;
>
> which I can use to retrieve the token.
>
> Are these the only two subclasses of ANTLRException that I need to be
> concerned about that return a Token? Or do I need to get tokens from
> the other exceptions? I want to make sure that I am capturing all
> errors generated along with where in the file they occur?
Hi,
I believe those the only recognition issues: "i didn't get the right
token" and "I have no idea how to proceed with this token".
Ter
--
Professor Comp. Sci., University of San Francisco
Creator, ANTLR Parser Generator, http://www.antlr.org
Cofounder, http://www.jguru.com
Cofounder, http://www.knowspam.net enjoy email again!
Cofounder, http://www.peerscope.com pure link sharing
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/antlr-interest/
<*> To unsubscribe from this group, send an email to:
antlr-interest-unsubscribe at yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list