I added an explanation of where to raise an error because you are consuming 
spurious tokens and correct the method call name in the Java code. Thanks for 
the input.

jim

> -----Original Message-----
> From: [email protected] [mailto:antlr-interest-
> [email protected]] On Behalf Of David-Sarah Hopwood
> Sent: Monday, November 30, 2009 6:23 PM
> To: [email protected]
> Subject: Re: [antlr-interest] Customizing Error Recovery
> 
> Jim Idle wrote:
> > As this subject comes up fairly often, I thought I would write an
> > article showing some of the ways you can influence, hijack, or
> > otherwise coerce the error recovery mechanisms within your parser.
> You
> > can find the article here:
> >
> > http://www.antlr.org/wiki/display/ANTLR3/Custom+Syntax+Error+Recovery
> 
> The '[ListBuffer<JFXTree> mems]' argument to syncClass should be
> removed.
> 
> 'protected void syncToSet(BitSet follow)' should be called
> 'syncToGoodToken' if it's to be consistent with the call in
> 'syncToSet()'.
> 
> A more serious problem is that this code seems to be suppressing
> errors, as opposed to recovering from them. That is, syncToSet will
> just discard invalid tokens, rather than reporting that an invalid
> token was found before syncing to the next good token.
> 
> --
> David-Sarah Hopwood  ⚥  http://davidsarah.livejournal.com





List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

--

You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en.


Reply via email to