[antlr-interest] Re: Error recovery - HELP
Monty Zukowski
monty at codetransform.com
Thu Apr 22 09:49:09 PDT 2004
On Apr 22, 2004, at 1:39 AM, jduquevieira wrote:
> I think that what is needed in this case is a way to push into the
> input the expected tokens when an error is found.
Yes, but currently this is not available in ANTLR. You need to inspect
the FOLLOW set at the point of the error, which means you need to write
a hook into the ANTLR code generator to help you out. Or dump out that
information using the -diagnostic option to antlr.Tool and then write
some sort of script to write the correct actions to handle the errors?
I think it's more work than that but I can't see all the way through it
yet.
Monty Zukowski
ANTLR & Java Consultant -- http://www.codetransform.com
ANSI C/GCC transformation toolkit --
http://www.codetransform.com/gcc.html
Embrace the Decay -- http://www.codetransform.com/EmbraceDecay.html
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