| Package | Description |
|---|---|
| org.antlr.v4.runtime |
| Modifier and Type | Class and 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 and Description |
|---|---|
RecognitionException |
ParserRuleContext.exception
The exception which forced this rule to return.
|
| Modifier and Type | Method and 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 |
DefaultErrorStrategy.recover(Parser recognizer,
RecognitionException e)
Recover from NoViableAlt errors.
|
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 |
ANTLRErrorStrategy.recover(Parser recognizer,
RecognitionException e)
Resynchronize the parser by consuming tokens until we find one
in the resynchronization set--loosely the set of tokens that can follow
the current rule.
|
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.
|
void |
DefaultErrorStrategy.reportError(Parser recognizer,
RecognitionException e) |
void |
ANTLRErrorStrategy.reportError(Parser recognizer,
RecognitionException e)
Report any kind of RecognitionException.
|
void |
ProxyErrorListener.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) |
void |
BaseErrorListener.syntaxError(Recognizer<?,?> recognizer,
Object offendingSymbol,
int line,
int charPositionInLine,
String msg,
RecognitionException e) |
void |
ANTLRErrorListener.syntaxError(Recognizer<?,?> recognizer,
Object offendingSymbol,
int line,
int charPositionInLine,
String msg,
RecognitionException e)
Upon syntax error, notify any interested parties.
|
| Modifier and Type | Method and Description |
|---|---|
Token |
Parser.match(int ttype)
Match current input symbol against ttype.
|
Token |
Parser.matchWildcard() |
Token |
DefaultErrorStrategy.recoverInline(Parser recognizer)
Attempt to recover from a single missing or extra token.
|
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 |
ANTLRErrorStrategy.recoverInline(Parser recognizer)
When matching elements within alternative, use this method
to recover.
|
void |
DefaultErrorStrategy.reportError(Parser recognizer,
RecognitionException e) |
void |
ANTLRErrorStrategy.reportError(Parser recognizer,
RecognitionException e)
Report any kind of RecognitionException.
|
void |
DefaultErrorStrategy.reportFailedPredicate(Parser recognizer,
FailedPredicateException e) |
void |
DefaultErrorStrategy.reportInputMismatch(Parser recognizer,
InputMismatchException e) |
void |
DefaultErrorStrategy.reportNoViableAlternative(Parser recognizer,
NoViableAltException e) |
Copyright © 1992-2013 ANTLR. All Rights Reserved.