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}.
<p>The generated code currently contains calls to {@link #sync} after
entering the decision state of a closure block ({@code (...)*} or
{@code (...)+}).</p>
<p>For an implementation based on Jim Idle's "magic sync" mechanism, see
{@link DefaultErrorStrategy#sync}.</p>
@see DefaultErrorStrategy#sync
@param recognizer the parser instance
@throws RecognitionException if an error is detected by the error
strategy but cannot be automatically recovered at the current state in
the parsing process
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}.
<p>The generated code currently contains calls to {@link #sync} after entering the decision state of a closure block ({@code (...)*} or {@code (...)+}).</p>
<p>For an implementation based on Jim Idle's "magic sync" mechanism, see {@link DefaultErrorStrategy#sync}.</p>
@see DefaultErrorStrategy#sync
@param recognizer the parser instance @throws RecognitionException if an error is detected by the error strategy but cannot be automatically recovered at the current state in the parsing process