Package | Description |
---|---|
org.antlr.v4.runtime | |
org.antlr.v4.runtime.tree.xpath | |
org.antlr.v4.tool |
Modifier and Type | Class | Description |
---|---|---|
class |
FailedPredicateException |
A semantic predicate failed during validation.
|
class |
InputMismatchException |
This signifies any kind of mismatched input exceptions such as
when the current input does not match the expected token.
|
class |
LexerNoViableAltException |
|
class |
NoViableAltException |
Indicates that the parser could not decide which of two or more paths
to take based upon the remaining input.
|
Modifier and Type | Field | Description |
---|---|---|
RecognitionException |
ParserRuleContext.exception |
The exception that forced this rule to return.
|
Modifier and Type | Method | Description |
---|---|---|
String |
Recognizer.getErrorHeader(RecognitionException e) |
What is the error header, normally line/character position information?
|
void |
Parser.notifyErrorListeners(Token offendingToken,
String msg,
RecognitionException e) |
|
void |
ANTLRErrorStrategy.recover(Parser recognizer,
RecognitionException e) |
This method is called to recover from exception
e . |
void |
BailErrorStrategy.recover(Parser recognizer,
RecognitionException e) |
Instead of recovering from exception
e , re-throw it wrapped
in a ParseCancellationException so it is not caught by the
rule function catches. |
void |
DefaultErrorStrategy.recover(Parser recognizer,
RecognitionException e) |
This method is called to recover from exception
e . |
void |
Lexer.recover(RecognitionException re) |
Lexers can normally match any char in it's vocabulary after matching
a token, so do the easy thing and just kill a character and hope
it all works out.
|
protected void |
ParserInterpreter.recover(RecognitionException e) |
Rely on the error handler for this parser but, if no tokens are consumed
to recover, add an error node.
|
void |
ANTLRErrorStrategy.reportError(Parser recognizer,
RecognitionException e) |
Report any kind of
RecognitionException . |
void |
DefaultErrorStrategy.reportError(Parser recognizer,
RecognitionException e) |
Report any kind of
RecognitionException . |
void |
ANTLRErrorListener.syntaxError(Recognizer<?,?> recognizer,
Object offendingSymbol,
int line,
int charPositionInLine,
String msg,
RecognitionException e) |
Upon syntax error, notify any interested parties.
|
void |
BaseErrorListener.syntaxError(Recognizer<?,?> recognizer,
Object offendingSymbol,
int line,
int charPositionInLine,
String msg,
RecognitionException e) |
|
void |
ConsoleErrorListener.syntaxError(Recognizer<?,?> recognizer,
Object offendingSymbol,
int line,
int charPositionInLine,
String msg,
RecognitionException e) |
Upon syntax error, notify any interested parties.
|
void |
ProxyErrorListener.syntaxError(Recognizer<?,?> recognizer,
Object offendingSymbol,
int line,
int charPositionInLine,
String msg,
RecognitionException e) |
Modifier and Type | Method | Description |
---|---|---|
Token |
Parser.match(int ttype) |
Match current input symbol against
ttype . |
Token |
Parser.matchWildcard() |
Match current input symbol as a wildcard.
|
void |
ANTLRErrorStrategy.recover(Parser recognizer,
RecognitionException e) |
This method is called to recover from exception
e . |
Token |
ANTLRErrorStrategy.recoverInline(Parser recognizer) |
This method is called when an unexpected symbol is encountered during an
inline match operation, such as
Parser.match(int) . |
Token |
BailErrorStrategy.recoverInline(Parser recognizer) |
Make sure we don't attempt to recover inline; if the parser
successfully recovers, it won't throw an exception.
|
Token |
DefaultErrorStrategy.recoverInline(Parser recognizer) |
This method is called when an unexpected symbol is encountered during an
inline match operation, such as
Parser.match(int) . |
void |
ANTLRErrorStrategy.sync(Parser recognizer) |
This method provides the error handler with an opportunity to handle
syntactic or semantic errors in the input stream before they result in a
RecognitionException . |
void |
DefaultErrorStrategy.sync(Parser recognizer) |
The default implementation of
ANTLRErrorStrategy.sync(org.antlr.v4.runtime.Parser) makes sure
that the current lookahead symbol is consistent with what were expecting
at this point in the ATN. |
Modifier and Type | Method | Description |
---|---|---|
void |
XPathLexerErrorListener.syntaxError(Recognizer<?,?> recognizer,
Object offendingSymbol,
int line,
int charPositionInLine,
String msg,
RecognitionException e) |
Modifier and Type | Method | Description |
---|---|---|
void |
GrammarParserInterpreter.BailButConsumeErrorStrategy.recover(Parser recognizer,
RecognitionException e) |
Modifier and Type | Method | Description |
---|---|---|
static List<ParserRuleContext> |
GrammarParserInterpreter.getAllPossibleParseTrees(Grammar g,
Parser originalParser,
TokenStream tokens,
int decision,
BitSet alts,
int startIndex,
int stopIndex,
int startRuleIndex) |
Given an ambiguous parse information, return the list of ambiguous parse trees.
|
Token |
GrammarParserInterpreter.BailButConsumeErrorStrategy.recoverInline(Parser recognizer) |
Copyright © 1992–2019 ANTLR. All rights reserved.