public void reportError(Parser recognizer,RecognitionException e){if (inErrorRecoveryMode(recognizer)) {return; }beginErrorCondition(recognizer);if ( e instanceof NoViableAltException ) {reportNoViableAlternative(recognizer, (NoViableAltException) e);}else if ( e instanceof InputMismatchException ) {reportInputMismatch(recognizer, (InputMismatchException)e);}else if ( e instanceof FailedPredicateException ) {reportFailedPredicate(recognizer, (FailedPredicateException)e);}else {System.err.println("unknown recognition error type: "+e.getClass().getName());recognizer.notifyErrorListeners(e.getOffendingToken(), e.getMessage(), e);}}
public virtual void ReportError(Parser recognizer, RecognitionException e){if (InErrorRecoveryMode(recognizer)){return;}BeginErrorCondition(recognizer);if (e is NoViableAltException){ReportNoViableAlternative(recognizer, (NoViableAltException)e);}else{if (e is InputMismatchException){ReportInputMismatch(recognizer, (InputMismatchException)e);}else{if (e is FailedPredicateException){ReportFailedPredicate(recognizer, (FailedPredicateException)e);}else{System.Console.Error.WriteLine("unknown recognition error type: " + e.GetType().FullName);NotifyErrorListeners(recognizer, e.Message, e);}}}}