[antlr-interest] error handling
Bharath Sundararaman
Bharath.Sundararaman at starthis.com
Mon Apr 4 14:47:41 PDT 2005
Hi Lance,
Did you visit http://www.antlr.org/doc/err.html#_bb1 yet? That should be
your first stop.
I catch parser exceptions from my main java program (the code which
calls the lexer, parser, tree walker and prints the ast), extract
relevant information presented by each exception (API:
http://www.antlr.org/javadoc/antlr/ANTLRException.html) and create my
own exception based on my app needs.
B.
-----Original Message-----
From: antlr-interest-bounces at antlr.org
[mailto:antlr-interest-bounces at antlr.org] On Behalf Of Lance Gutteridge
Sent: Monday, April 04, 2005 3:33 PM
To: antlr-interest at antlr.org
Subject: [antlr-interest] error handling
This is probably a simple question. I want to report parse errors to
the
user. The parser throws an exception. Which one do I catch and what
information about the position and nature of the error is there? If
someone could point me to some documentation on this subject I would be
grateful.
Thanks
Lance
More information about the antlr-interest
mailing list