[antlr-interest] Non-Default Exception-Handling - Synching to the end of the rule
Colm McHugh
colmmagoo at yahoo.com
Fri Dec 10 17:28:12 PST 2004
This may have come up before, but I am wondering if
there is a convenient way to synch to the end of the
rule when doing non-default exception handling ? I
like the way the default exception handler does this,
and it would be great if there was a simple way to
apply this with non-default exception-handling.
The reason I am asking is because with non-default
exception handling, the lookahead is not advanced, and
multiple exceptions can be raised for the same syntax
error.
I could make my exception-handling code ignore the
exception if it sees that it has already processed the
message, but hey I like to do as little work as
possible.
I could also take a really good look at the placement
of my exception-handling blocks in my grammar; I
suspect that some may be superfluous, and merely just
rethrowing the same exception message. I am paranoid
that all exceptions are trapped in the parser, and I
also want to be able to report as many errors as
possible to the user.
Anyhoo, thanks for any opinions/advice!
Colm.
__________________________________
Do you Yahoo!?
Read only the mail you want - Yahoo! Mail SpamGuard.
http://promotions.yahoo.com/new_mail
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