Package | Description |
---|---|
org.antlr.v4.runtime | |
org.antlr.v4.runtime.atn | |
org.antlr.v4.runtime.misc | |
org.antlr.v4.runtime.tree |
Modifier and Type | Method and Description |
---|---|
void |
DefaultErrorStrategy.beginErrorCondition(Parser recognizer) |
void |
ANTLRErrorStrategy.beginErrorCondition(Parser recognizer)
Notify handler that parser has entered an error state.
|
void |
DefaultErrorStrategy.consumeUntil(Parser recognizer,
IntervalSet set)
Consume tokens until one matches the given token set
|
void |
DefaultErrorStrategy.endErrorCondition(Parser recognizer) |
void |
ANTLRErrorStrategy.endErrorCondition(Parser recognizer)
Reset the error handler.
|
protected IntervalSet |
DefaultErrorStrategy.getErrorRecoverySet(Parser recognizer) |
IntervalSet |
DefaultErrorStrategy.getExpectedTokens(Parser recognizer) |
protected Token |
DefaultErrorStrategy.getMissingSymbol(Parser recognizer)
Conjure up a missing token during error recovery.
|
boolean |
DefaultErrorStrategy.inErrorRecoveryMode(Parser recognizer) |
boolean |
ANTLRErrorStrategy.inErrorRecoveryMode(Parser recognizer)
Is the parser in the process of recovering from an error? Upon
a syntax error, the parser enters recovery mode and stays there until
the next successful match of a token.
|
Future<JDialog> |
RuleContext.inspect(Parser parser)
Call this method to view a parse tree in a dialog box visually.
|
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.
|
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 |
ProxyErrorListener.reportAmbiguity(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
BitSet ambigAlts,
ATNConfigSet configs) |
void |
DiagnosticErrorListener.reportAmbiguity(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
BitSet ambigAlts,
ATNConfigSet configs) |
void |
BaseErrorListener.reportAmbiguity(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
BitSet ambigAlts,
ATNConfigSet configs) |
void |
ANTLRErrorListener.reportAmbiguity(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
BitSet ambigAlts,
ATNConfigSet configs)
Called when the parser detects a true ambiguity: an input
sequence can be matched literally by two or more pass through
the grammar.
|
void |
ProxyErrorListener.reportAttemptingFullContext(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
ATNConfigSet configs) |
void |
DiagnosticErrorListener.reportAttemptingFullContext(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
ATNConfigSet configs) |
void |
BaseErrorListener.reportAttemptingFullContext(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
ATNConfigSet configs) |
void |
ANTLRErrorListener.reportAttemptingFullContext(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
ATNConfigSet configs) |
void |
ProxyErrorListener.reportContextSensitivity(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
ATNConfigSet configs) |
void |
DiagnosticErrorListener.reportContextSensitivity(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
ATNConfigSet configs) |
void |
BaseErrorListener.reportContextSensitivity(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
ATNConfigSet configs) |
void |
ANTLRErrorListener.reportContextSensitivity(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
ATNConfigSet configs)
Called by the parser when it find a conflict that is resolved
by retrying the parse with full context.
|
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.reportMissingToken(Parser recognizer) |
void |
DefaultErrorStrategy.reportNoViableAlternative(Parser recognizer,
NoViableAltException e) |
void |
DefaultErrorStrategy.reportUnwantedToken(Parser recognizer) |
void |
RuleContext.save(Parser parser,
String fileName)
Save this tree in a postscript file
|
void |
RuleContext.save(Parser parser,
String fileName,
String fontName,
int fontSize)
Save this tree in a postscript file using a particular font name and size
|
Token |
DefaultErrorStrategy.singleTokenDeletion(Parser recognizer) |
boolean |
DefaultErrorStrategy.singleTokenInsertion(Parser recognizer) |
void |
DefaultErrorStrategy.sync(Parser recognizer)
Make 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)
Make sure that the current lookahead symbol is consistent with
what were expecting at this point in the ATN.
|
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) |
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 |
Constructor and Description |
---|
ParserATNSimulator(Parser parser,
ATN atn,
DFA[] decisionToDFA,
PredictionContextCache sharedContextCache) |
Modifier and Type | Method and Description |
---|---|
protected void |
TestRig.process(Lexer lexer,
Class<? extends Parser> parserClass,
Parser parser,
InputStream is,
Reader r) |
Modifier and Type | Method and Description |
---|---|
protected void |
TestRig.process(Lexer lexer,
Class<? extends Parser> parserClass,
Parser parser,
InputStream is,
Reader r) |
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.
|
Copyright © 1992-2013 ANTLR. All Rights Reserved.