ANTLRErrorListener

How to emit recognition errors.

Members

Functions

reportAmbiguity
void reportAmbiguity(InterfaceParser recognizer, DFA dfa, int startIndex, int stopIndex, bool exact, BitSet ambigAlts, ATNConfigSet configs)

This method is called by the parser when a full-context prediction results in an ambiguity.

reportAttemptingFullContext
void reportAttemptingFullContext(InterfaceParser recognizer, DFA dfa, int startIndex, int stopIndex, BitSet conflictingAlts, ATNConfigSet configs)

This method is called when an SLL conflict occurs and the parser is about to use the full context information to make an LL decision.

reportContextSensitivity
void reportContextSensitivity(InterfaceParser recognizer, DFA dfa, int startIndex, int stopIndex, int prediction, ATNConfigSet configs)

This method is called by the parser when a full-context prediction has a unique result.

syntaxError
void syntaxError(InterfaceRecognizer recognizer, Object offendingSymbol, int line, int charPositionInLine, string msg, RecognitionException e)

Upon syntax error, notify any interested parties. This is not how to recover from errors or compute error messages. {@link ANTLRErrorStrategy} specifies how to recover from syntax errors and how to compute error messages. This listener's job is simply to emit a computed message, though it has enough information to create its own message in many cases.

Meta