protected internal virtual void ReportUnwantedToken(Parser recognizer)
{
if (InErrorRecoveryMode(recognizer))
{
return;
}
BeginErrorCondition(recognizer);
IToken t = recognizer.CurrentToken;
string tokenName = GetTokenErrorDisplay(t);
IntervalSet expecting = GetExpectedTokens(recognizer);
string msg = "extraneous input " + tokenName + " expecting " + expecting.ToString(recognizer.Vocabulary);
recognizer.NotifyErrorListeners(t, msg, null);
}