protected Token singleTokenDeletion(Parser recognizer) {
		int nextTokenType = recognizer.getInputStream().LA(2);
		IntervalSet expecting = getExpectedTokens(recognizer);
		if ( expecting.contains(nextTokenType) ) {
			reportUnwantedToken(recognizer);
			/*
			System.err.println("recoverFromMismatchedToken deleting "+
							   ((TokenStream)recognizer.getInputStream()).LT(1)+
							   " since "+((TokenStream)recognizer.getInputStream()).LT(2)+
							   " is what we want");
			*/
			recognizer.consume(); // simply delete extra token
			// we want to return the token we're actually matching
			Token matchedSymbol = recognizer.getCurrentToken();
			reportMatch(recognizer);  // we know current token is correct
			return matchedSymbol;
		}
		return null;
	}
This method implements the single-token deletion inline error recovery
strategy. It is called by {@link #recoverInline} to attempt to recover
from mismatched input. If this method returns null, the parser and error
handler state will not have changed. If this method returns non-null,
{@code recognizer} will <em>not</em> be in error recovery mode since the
returned token was a successful match.

<p>If the single-token deletion is successful, this method calls
{@link #reportUnwantedToken} to report the error, followed by
{@link Parser#consume} to actually "delete" the extraneous token. Then,
before returning {@link #reportMatch} is called to signal a successful
match.</p>

@param recognizer the parser instance
@return the successfully matched {@link Token} instance if single-token
deletion successfully recovers from the mismatched input, otherwise
{@code null}
runtime/Java/src/org/antlr/v4/runtime/DefaultErrorStrategy.java