public void notifyErrorListeners(Token offendingToken, String msg, RecognitionException e) { _syntaxErrors++; int line = -1; int charPositionInLine = -1; line = offendingToken.getLine(); charPositionInLine = offendingToken.getCharPositionInLine(); ANTLRErrorListener listener = getErrorListenerDispatch(); listener.syntaxError(this, offendingToken, line, charPositionInLine, msg, e); }
@Override public void syntaxError( Recognizer<?, ?> recognizer, Object offendingSymbol, int line, int charPositionInLine, String msg, RecognitionException e) { for (ANTLRErrorListener listener : delegates) { listener.syntaxError(recognizer, offendingSymbol, line, charPositionInLine, msg, e); } }
@Override public void reportContextSensitivity( Parser recognizer, DFA dfa, int startIndex, int stopIndex, int prediction, ATNConfigSet configs) { for (ANTLRErrorListener listener : delegates) { listener.reportContextSensitivity( recognizer, dfa, startIndex, stopIndex, prediction, configs); } }
@Override public void reportAttemptingFullContext( Parser recognizer, DFA dfa, int startIndex, int stopIndex, BitSet conflictingAlts, ATNConfigSet configs) { for (ANTLRErrorListener listener : delegates) { listener.reportAttemptingFullContext( recognizer, dfa, startIndex, stopIndex, conflictingAlts, configs); } }
@Override public void reportAmbiguity( Parser recognizer, DFA dfa, int startIndex, int stopIndex, boolean exact, BitSet ambigAlts, ATNConfigSet configs) { for (ANTLRErrorListener listener : delegates) { listener.reportAmbiguity(recognizer, dfa, startIndex, stopIndex, exact, ambigAlts, configs); } }