Tests whether or not {@code recognizer} is in the process of recovering from an error. In error recovery mode, {@link Parser#consume} adds symbols to the parse tree by calling {@link ParserRuleContext#addErrorNode(Token)} instead of {@link ParserRuleContext#addChild(Token)}.
This method is called to recover from exception {@code e}. This method is called after {@link #reportError} by the default exception handler generated for a rule method.
This method is called when an unexpected symbol is encountered during an inline match operation, such as {@link Parser#match}. If the error strategy successfully recovers from the match failure, this method returns the {@link Token} instance which should be treated as the successful result of the match.
Report any kind of {@link RecognitionException}. This method is called by the default exception handler generated for a rule method.
This method is called by when the parser successfully matches an input symbol.
Reset the error handler state for the specified {@code recognizer}. @param recognizer the parser instance
This method provides the error handler with an opportunity to handle syntactic or semantic errors in the input stream before they result in a {@link RecognitionException}.
The interface for defining strategies to deal with syntax errors encountered during a parse by ANTLR-generated parsers. We distinguish between three different kinds of errors:
<ul> <li>The parser could not figure out which path to take in the ATN (none of the available alternatives could possibly match)</li> <li>The current input does not match what we were looking for</li> <li>A predicate evaluated to false</li> </ul>
Implementations of this interface report syntax errors by calling {@link Parser#notifyErrorListeners}.
<p>TODO: what to do about lexers</p>