Package | Description |
---|---|
org.antlr.v4.runtime | |
org.antlr.v4.runtime.atn | |
org.antlr.v4.runtime.tree | |
org.antlr.v4.runtime.tree.pattern | |
org.antlr.v4.runtime.tree.xpath |
Modifier and Type | Class and Description |
---|---|
class |
ParserInterpreter
A parser simulator that mimics what ANTLR's generated
parser code does.
|
Modifier and Type | Method and Description |
---|---|
protected void |
DefaultErrorStrategy.beginErrorCondition(Parser recognizer)
This method is called to enter error recovery mode when a recognition
exception is reported.
|
protected void |
DefaultErrorStrategy.consumeUntil(Parser recognizer,
IntervalSet set)
Consume tokens until one matches the given token set.
|
protected void |
DefaultErrorStrategy.endErrorCondition(Parser recognizer)
This method is called to leave error recovery mode after recovering from
a recognition exception.
|
protected String |
DiagnosticErrorListener.getDecisionDescription(Parser recognizer,
DFA dfa) |
protected IntervalSet |
DefaultErrorStrategy.getErrorRecoverySet(Parser recognizer) |
protected IntervalSet |
DefaultErrorStrategy.getExpectedTokens(Parser recognizer) |
protected Token |
DefaultErrorStrategy.getMissingSymbol(Parser recognizer)
Conjure up a missing token during error recovery.
|
boolean |
DefaultErrorStrategy.inErrorRecoveryMode(Parser recognizer)
Tests whether or not
recognizer is in the process of recovering
from an error. |
boolean |
ANTLRErrorStrategy.inErrorRecoveryMode(Parser recognizer)
Tests whether or not
recognizer is in the process of recovering
from an error. |
void |
DefaultErrorStrategy.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 |
ANTLRErrorStrategy.recover(Parser recognizer,
RecognitionException e)
This method is called to recover from exception
e . |
Token |
DefaultErrorStrategy.recoverInline(Parser recognizer)
This method is called when an unexpected symbol is encountered during an
inline match operation, such as
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 |
ANTLRErrorStrategy.recoverInline(Parser recognizer)
This method is called when an unexpected symbol is encountered during an
inline match operation, such as
match(int) . |
void |
ProxyErrorListener.reportAmbiguity(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
boolean exact,
BitSet ambigAlts,
ATNConfigSet configs) |
void |
DiagnosticErrorListener.reportAmbiguity(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
boolean exact,
BitSet ambigAlts,
ATNConfigSet configs) |
void |
BaseErrorListener.reportAmbiguity(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
boolean exact,
BitSet ambigAlts,
ATNConfigSet configs) |
void |
ANTLRErrorListener.reportAmbiguity(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
boolean exact,
BitSet ambigAlts,
ATNConfigSet configs)
This method is called by the parser when a full-context prediction
results in an ambiguity.
|
void |
ProxyErrorListener.reportAttemptingFullContext(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
BitSet conflictingAlts,
ATNConfigSet configs) |
void |
DiagnosticErrorListener.reportAttemptingFullContext(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
BitSet conflictingAlts,
ATNConfigSet configs) |
void |
BaseErrorListener.reportAttemptingFullContext(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
BitSet conflictingAlts,
ATNConfigSet configs) |
void |
ANTLRErrorListener.reportAttemptingFullContext(Parser 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.
|
void |
ProxyErrorListener.reportContextSensitivity(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
int prediction,
ATNConfigSet configs) |
void |
DiagnosticErrorListener.reportContextSensitivity(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
int prediction,
ATNConfigSet configs) |
void |
BaseErrorListener.reportContextSensitivity(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
int prediction,
ATNConfigSet configs) |
void |
ANTLRErrorListener.reportContextSensitivity(Parser 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.
|
void |
DefaultErrorStrategy.reportError(Parser recognizer,
RecognitionException e)
Report any kind of
RecognitionException . |
void |
ANTLRErrorStrategy.reportError(Parser recognizer,
RecognitionException e)
Report any kind of
RecognitionException . |
protected void |
DefaultErrorStrategy.reportFailedPredicate(Parser recognizer,
FailedPredicateException e)
This is called by
DefaultErrorStrategy.reportError(org.antlr.v4.runtime.Parser, org.antlr.v4.runtime.RecognitionException) when the exception is a
FailedPredicateException . |
protected void |
DefaultErrorStrategy.reportInputMismatch(Parser recognizer,
InputMismatchException e)
This is called by
DefaultErrorStrategy.reportError(org.antlr.v4.runtime.Parser, org.antlr.v4.runtime.RecognitionException) when the exception is an
InputMismatchException . |
void |
DefaultErrorStrategy.reportMatch(Parser recognizer)
This method is called by when the parser successfully matches an input
symbol.
|
void |
ANTLRErrorStrategy.reportMatch(Parser recognizer)
This method is called by when the parser successfully matches an input
symbol.
|
protected void |
DefaultErrorStrategy.reportMissingToken(Parser recognizer)
This method is called to report a syntax error which requires the
insertion of a missing token into the input stream.
|
protected void |
DefaultErrorStrategy.reportNoViableAlternative(Parser recognizer,
NoViableAltException e)
This is called by
DefaultErrorStrategy.reportError(org.antlr.v4.runtime.Parser, org.antlr.v4.runtime.RecognitionException) when the exception is a
NoViableAltException . |
protected void |
DefaultErrorStrategy.reportUnwantedToken(Parser recognizer)
This method is called to report a syntax error which requires the removal
of a token from the input stream.
|
void |
DefaultErrorStrategy.reset(Parser recognizer)
Reset the error handler state for the specified
recognizer . |
void |
ANTLRErrorStrategy.reset(Parser recognizer)
Reset the error handler state for the specified
recognizer . |
protected Token |
DefaultErrorStrategy.singleTokenDeletion(Parser recognizer)
This method implements the single-token deletion inline error recovery
strategy.
|
protected boolean |
DefaultErrorStrategy.singleTokenInsertion(Parser recognizer)
This method implements the single-token insertion inline error recovery
strategy.
|
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. |
void |
BailErrorStrategy.sync(Parser recognizer)
Make sure we don't attempt to recover from problems in subrules.
|
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 . |
String |
ParserRuleContext.toInfoString(Parser recognizer)
Used for rule context info debugging during parse-time, not so much for ATN debugging
|
String |
RuleContext.toStringTree(Parser recog)
Print out a whole tree, not just a node, in LISP format
(root child1 ..
|
Constructor and Description |
---|
FailedPredicateException(Parser recognizer) |
FailedPredicateException(Parser recognizer,
String predicate) |
FailedPredicateException(Parser recognizer,
String predicate,
String message) |
InputMismatchException(Parser recognizer) |
InputMismatchException(Parser recognizer,
int state,
ParserRuleContext ctx) |
NoViableAltException(Parser recognizer) |
NoViableAltException(Parser recognizer,
TokenStream input,
Token startToken,
Token offendingToken,
ATNConfigSet deadEndConfigs,
ParserRuleContext ctx) |
Modifier and Type | Field and Description |
---|---|
protected Parser |
ParserATNSimulator.parser |
Modifier and Type | Method and Description |
---|---|
Parser |
ParserATNSimulator.getParser() |
Constructor and Description |
---|
ParserATNSimulator(Parser parser,
ATN atn,
DFA[] decisionToDFA,
PredictionContextCache sharedContextCache) |
ProfilingATNSimulator(Parser parser) |
Modifier and Type | Method and Description |
---|---|
static String |
Trees.getNodeText(Tree t,
Parser recog) |
String |
TerminalNodeImpl.toStringTree(Parser parser) |
String |
ParseTree.toStringTree(Parser parser)
Specialize toStringTree so that it can print out more information
based upon the parser.
|
static String |
Trees.toStringTree(Tree t,
Parser recog)
Print out a whole tree in LISP form.
|
Modifier and Type | Method and Description |
---|---|
Parser |
ParseTreePatternMatcher.getParser()
Used to collect to the grammar file name, token names, rule names for
used to parse the pattern into a parse tree.
|
Constructor and Description |
---|
ParseTreePatternMatcher(Lexer lexer,
Parser parser)
|
Modifier and Type | Field and Description |
---|---|
protected Parser |
XPath.parser |
Modifier and Type | Method and Description |
---|---|
static Collection<ParseTree> |
XPath.findAll(ParseTree tree,
String xpath,
Parser parser) |
Constructor and Description |
---|
XPath(Parser parser,
String path) |
Copyright © 1992–2020 ANTLR. All rights reserved.