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

Attachment: signature.asc
Description: OpenPGP digital signature

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

Reply via email to