Define 2 error recovery productions to use inside your parser productions:
// ErrorReplace production called when string received was interpreted as expected string.
void ErrorReplace(String received, String expected) throws ParseAbortException
// ErrorMissing production called when the token was missing
void ErrorMissing(String skipped) throws ParseAbortException
and one error recovery method to be used in catch clauses:
// ErrorSkipto called to consume all tokens up to the first one of kind
// The error message in e is also printed.
void ErrorSkipto(int stoptoken, Exception e) throws ParseAbortException
void ErrorSkipto(int stoptoken, Error e) throws ParseAbortException
(The 2 separate definitions are needed to handle lexical errors which are errors
and parse errors which are exceptions).