| Modifier and Type | Field and Description |
|---|---|
protected List<ParseTreeListener> |
Parser._parseListeners
The list of
ParseTreeListener listeners registered to receive
events during the parse. |
String |
RuntimeMetaData.VersionMismatchException.generatingToolVersion
The version of the ANTLR 4 Tool a parser was generated with.
|
| Modifier and Type | Method and Description |
|---|---|
RuleContext |
RecognitionException.getCtx()
Gets the
RuleContext at the time this exception was thrown. |
ATNConfigSet |
NoViableAltException.getDeadEndConfigs() |
ATNConfigSet |
LexerNoViableAltException.getDeadEndConfigs() |
IntervalSet |
RecognitionException.getExpectedTokens()
Gets the set of input symbols which could potentially follow the
previously matched symbol at the time this exception was thrown.
|
CharStream |
TokenSource.getInputStream()
Get the
CharStream from which this token source is currently
providing tokens. |
IntStream |
RecognitionException.getInputStream()
Gets the input stream which is the symbol source for the recognizer where
this exception was thrown.
|
Token |
RecognitionException.getOffendingToken() |
String |
FailedPredicateException.getPredicate() |
Recognizer<?,?> |
RecognitionException.getRecognizer()
Gets the
Recognizer where this exception occurred. |
protected Token |
DefaultErrorStrategy.singleTokenDeletion(Parser recognizer)
This method implements the single-token deletion inline error recovery
strategy.
|
| Modifier and Type | Method and Description |
|---|---|
void |
Recognizer.action(RuleContext _localctx,
int ruleIndex,
int actionIndex) |
static void |
RuntimeMetaData.checkVersion(String toolVersion,
String compileTimeVersion)
This method provides the ability to detect mismatches between the version
of ANTLR 4 used to generate a parser, the version of the ANTLR runtime a
parser was compiled against, and the version of the ANTLR runtime which
is currently executing.
|
protected BitSet |
DiagnosticErrorListener.getConflictingAlts(BitSet reportedAlts,
ATNConfigSet configs)
Computes the set of conflicting or ambiguous alternatives from a
configuration set, if that information was not already provided by the
parser.
|
Future<JDialog> |
RuleContext.inspect(List<String> ruleNames) |
Future<JDialog> |
RuleContext.inspect(Parser parser)
Call this method to view a parse tree in a dialog box visually.
|
void |
Parser.notifyErrorListeners(Token offendingToken,
String msg,
RecognitionException e) |
boolean |
Recognizer.precpred(RuleContext localctx,
int precedence) |
boolean |
Parser.precpred(RuleContext localctx,
int precedence) |
void |
TokenStreamRewriter.replace(String programName,
int from,
int to,
Object text) |
void |
TokenStreamRewriter.replace(String programName,
Token from,
Token to,
Object text) |
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 |
RuleContext.save(List<String> ruleNames,
String fileName)
Save this tree in a postscript file
|
void |
RuleContext.save(List<String> ruleNames,
String fileName,
String fontName,
int fontSize)
Save this tree in a postscript file using a particular font name and size
|
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
|
boolean |
Recognizer.sempred(RuleContext _localctx,
int ruleIndex,
int actionIndex) |
protected void |
RecognitionException.setOffendingToken(Token offendingToken) |
void |
ProxyErrorListener.syntaxError(Recognizer<?,?> recognizer,
Object offendingSymbol,
int line,
int charPositionInLine,
String msg,
RecognitionException e) |
void |
ProxyErrorListener.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 |
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.
|
void |
ANTLRErrorListener.syntaxError(Recognizer<?,?> recognizer,
Object offendingSymbol,
int line,
int charPositionInLine,
String msg,
RecognitionException e)
Upon syntax error, notify any interested parties.
|
String |
RuleContext.toString(List<String> ruleNames) |
String |
RuleContext.toString(List<String> ruleNames,
RuleContext stop) |
String |
RuleContext.toString(List<String> ruleNames,
RuleContext stop) |
String |
RuleContext.toString(Recognizer<?,?> recog) |
String |
RuleContext.toString(Recognizer<?,?> recog,
RuleContext stop) |
String |
RuleContext.toString(Recognizer<?,?> recog,
RuleContext stop) |
String |
RuleContext.toStringTree(List<String> ruleNames)
Print out a whole tree, not just a node, in LISP format
(root child1 ..
|
String |
RuleContext.toStringTree(Parser recog)
Print out a whole tree, not just a node, in LISP format
(root child1 ..
|
| Modifier and Type | Field and Description |
|---|---|
ATNConfigSet |
DecisionEventInfo.configs
The configuration set containing additional information relevant to the
prediction state when the current event occurred, or
null if no
additional information is relevant or available. |
PredictionContext |
ATNConfig.context
The stack of invoking states leading to the rule/states associated
with this config.
|
protected Parser |
ParserATNSimulator.parser |
protected Lexer |
LexerATNSimulator.recog |
| Modifier and Type | Method and Description |
|---|---|
IntervalSet[] |
LL1Analyzer.getDecisionLookahead(ATNState s)
Calculates the SLL(1) expected lookahead set for each outgoing transition
of an
ATNState. |
protected ATNConfig |
ParserATNSimulator.getEpsilonTarget(ATNConfig config,
Transition t,
boolean collectPredicates,
boolean inContext,
boolean fullCtx,
boolean treatEofAsEpsilon) |
protected LexerATNConfig |
LexerATNSimulator.getEpsilonTarget(CharStream input,
LexerATNConfig config,
Transition t,
ATNConfigSet configs,
boolean speculative,
boolean treatEofAsEpsilon) |
protected DFAState |
ParserATNSimulator.getExistingTargetState(DFAState previousD,
int t)
Get an existing target state for an edge in the DFA.
|
protected DFAState |
LexerATNSimulator.getExistingTargetState(DFAState s,
int t)
Get an existing target state for an edge in the DFA.
|
LexerActionExecutor |
LexerATNConfig.getLexerActionExecutor()
Gets the
LexerActionExecutor capable of executing the embedded
action(s) for the current configuration. |
protected ATNState |
ParserATNSimulator.getReachableTarget(Transition trans,
int ttype) |
protected ATNState |
LexerATNSimulator.getReachableTarget(Transition trans,
int t) |
IntervalSet |
Transition.label() |
ATNConfig |
ParserATNSimulator.precedenceTransition(ATNConfig config,
PrecedencePredicateTransition pt,
boolean collectPredicates,
boolean inContext,
boolean fullCtx) |
protected ATNConfig |
ParserATNSimulator.predTransition(ATNConfig config,
PredicateTransition pt,
boolean collectPredicates,
boolean inContext,
boolean fullCtx) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
LL1Analyzer._LOOK(ATNState s,
ATNState stopState,
PredictionContext ctx,
IntervalSet look,
Set<ATNConfig> lookBusy,
BitSet calledRuleStack,
boolean seeThruPreds,
boolean addEOF)
Compute set of tokens that can follow
s in the ATN in the
specified ctx. |
protected void |
LL1Analyzer._LOOK(ATNState s,
ATNState stopState,
PredictionContext ctx,
IntervalSet look,
Set<ATNConfig> lookBusy,
BitSet calledRuleStack,
boolean seeThruPreds,
boolean addEOF)
Compute set of tokens that can follow
s in the ATN in the
specified ctx. |
int |
ParserATNSimulator.adaptivePredict(TokenStream input,
int decision,
ParserRuleContext outerContext) |
boolean |
ATNConfigSet.add(ATNConfig config,
DoubleKeyMap<PredictionContext,PredictionContext,PredictionContext> mergeCache)
Adding a new config means merging contexts with existing configs for
(s, i, pi, _), where s is the
ATNConfig.state, i is the ATNConfig.alt, and
pi is the ATNConfig.semanticContext. |
protected DFAState |
ParserATNSimulator.addDFAEdge(DFA dfa,
DFAState from,
int t,
DFAState to)
Add an edge to the DFA, if possible.
|
protected DFAState |
ParserATNSimulator.addDFAEdge(DFA dfa,
DFAState from,
int t,
DFAState to)
Add an edge to the DFA, if possible.
|
void |
ATN.addState(ATNState state) |
static LexerActionExecutor |
LexerActionExecutor.append(LexerActionExecutor lexerActionExecutor,
LexerAction lexerAction)
Creates a
LexerActionExecutor which executes the actions for
the input lexerActionExecutor followed by a specified
lexerAction. |
protected ATNConfigSet |
ParserATNSimulator.computeStartState(ATNState p,
RuleContext ctx,
boolean fullCtx) |
IntervalSet[] |
LL1Analyzer.getDecisionLookahead(ATNState s)
Calculates the SLL(1) expected lookahead set for each outgoing transition
of an
ATNState. |
IntervalSet |
ATN.getExpectedTokens(int stateNumber,
RuleContext context)
Computes the set of input symbols which could follow ATN state number
stateNumber in the specified full context. |
IntervalSet |
LL1Analyzer.LOOK(ATNState s,
ATNState stopState,
RuleContext ctx)
Compute set of tokens that can follow
s in the ATN in the
specified ctx. |
IntervalSet |
LL1Analyzer.LOOK(ATNState s,
ATNState stopState,
RuleContext ctx)
Compute set of tokens that can follow
s in the ATN in the
specified ctx. |
IntervalSet |
LL1Analyzer.LOOK(ATNState s,
RuleContext ctx)
Compute set of tokens that can follow
s in the ATN in the
specified ctx. |
protected void |
ProfilingATNSimulator.reportAmbiguity(DFA dfa,
DFAState D,
int startIndex,
int stopIndex,
boolean exact,
BitSet ambigAlts,
ATNConfigSet configs) |
protected void |
ParserATNSimulator.reportAmbiguity(DFA dfa,
DFAState D,
int startIndex,
int stopIndex,
boolean exact,
BitSet ambigAlts,
ATNConfigSet configs)
If context sensitive parsing, we know it's ambiguity not conflict
|
protected void |
ProfilingATNSimulator.reportAttemptingFullContext(DFA dfa,
BitSet conflictingAlts,
ATNConfigSet configs,
int startIndex,
int stopIndex) |
protected void |
ParserATNSimulator.reportAttemptingFullContext(DFA dfa,
BitSet conflictingAlts,
ATNConfigSet configs,
int startIndex,
int stopIndex) |
String |
PredictionContext.toString(Recognizer<?,?> recog) |
String |
ATNConfig.toString(Recognizer<?,?> recog,
boolean showAlt) |
| Constructor and Description |
|---|
ATNConfig(ATNConfig c,
ATNState state,
PredictionContext context) |
ATNConfig(ATNConfig c,
ATNState state,
PredictionContext context,
SemanticContext semanticContext) |
ATNConfig(ATNState state,
int alt,
PredictionContext context) |
ATNConfig(ATNState state,
int alt,
PredictionContext context,
SemanticContext semanticContext) |
ATNDeserializer(ATNDeserializationOptions deserializationOptions) |
DecisionEventInfo(int decision,
ATNConfigSet configs,
TokenStream input,
int startIndex,
int stopIndex,
boolean fullCtx) |
LexerATNConfig(ATNState state,
int alt,
PredictionContext context) |
LexerATNConfig(ATNState state,
int alt,
PredictionContext context,
LexerActionExecutor lexerActionExecutor) |
LexerATNConfig(ATNState state,
int alt,
PredictionContext context,
LexerActionExecutor lexerActionExecutor) |
LexerATNConfig(LexerATNConfig c,
ATNState state,
LexerActionExecutor lexerActionExecutor) |
LexerATNConfig(LexerATNConfig c,
ATNState state,
PredictionContext context) |
LexerATNSimulator(Lexer recog,
ATN atn,
DFA[] decisionToDFA,
PredictionContextCache sharedContextCache) |
LookaheadEventInfo(int decision,
ATNConfigSet configs,
TokenStream input,
int startIndex,
int stopIndex,
boolean fullCtx)
Constructs a new instance of the
LookaheadEventInfo class with
the specified detailed lookahead information. |
NotSetTransition(ATNState target,
IntervalSet set) |
ParserATNSimulator(Parser parser,
ATN atn,
DFA[] decisionToDFA,
PredictionContextCache sharedContextCache) |
SetTransition(ATNState target,
IntervalSet set) |
| Modifier and Type | Field and Description |
|---|---|
DFAState[] |
DFAState.edges
edges[symbol] points to target of symbol. |
DFAState.PredPrediction[] |
DFAState.predicates
During SLL parsing, this is a list of predicates associated with the
ATN configurations of the DFA state.
|
DFAState |
DFA.s0 |
| Modifier and Type | Method and Description |
|---|---|
String |
DFA.toString(String[] tokenNames) |
| Constructor and Description |
|---|
DFASerializer(DFA dfa,
String[] tokenNames) |
| Modifier and Type | Method and Description |
|---|---|
IntSet |
IntSet.and(IntSet a)
Return a new
IntSet object containing all elements that are
present in both the current set and the specified set a. |
IntSet |
IntSet.complement(IntSet elements)
Return a new
IntSet object containing all elements that are
present in elements but not present in the current set. |
IntSet |
IntSet.or(IntSet a)
Return a new
IntSet object containing all elements that are
present in the current set, the specified set a, or both. |
IntSet |
IntSet.subtract(IntSet a)
Return a new
IntSet object containing all elements that are
present in the current set but not present in the input set a. |
| Modifier and Type | Method and Description |
|---|---|
IntSet |
IntSet.addAll(IntSet set)
Modify the current
IntSet object to contain all elements that are
present in itself, the specified set, or both. |
IntSet |
IntSet.and(IntSet a)
Return a new
IntSet object containing all elements that are
present in both the current set and the specified set a. |
IntSet |
IntSet.complement(IntSet elements)
Return a new
IntSet object containing all elements that are
present in elements but not present in the current set. |
boolean |
Array2DHashSet.containsFast(T obj) |
void |
LogManager.log(String component,
String msg) |
IntSet |
IntSet.or(IntSet a)
Return a new
IntSet object containing all elements that are
present in the current set, the specified set a, or both. |
boolean |
Array2DHashSet.removeFast(T obj) |
static IntervalSet |
IntervalSet.subtract(IntervalSet left,
IntervalSet right)
Compute the set difference between two interval sets.
|
static IntervalSet |
IntervalSet.subtract(IntervalSet left,
IntervalSet right)
Compute the set difference between two interval sets.
|
IntSet |
IntSet.subtract(IntSet a)
Return a new
IntSet object containing all elements that are
present in the current set but not present in the input set a. |
| Constructor and Description |
|---|
Array2DHashSet(AbstractEqualityComparator<? super T> comparator) |
Array2DHashSet(AbstractEqualityComparator<? super T> comparator,
int initialCapacity,
int initialBucketCapacity) |
FlexibleHashMap(AbstractEqualityComparator<? super K> comparator) |
FlexibleHashMap(AbstractEqualityComparator<? super K> comparator,
int initialCapacity,
int initialBucketCapacity) |
| Modifier and Type | Method and Description |
|---|---|
static String |
Trees.getNodeText(Tree t,
List<String> ruleNames) |
static String |
Trees.getNodeText(Tree t,
Parser recog) |
static String |
Trees.getPS(Tree t,
List<String> ruleNames) |
static String |
Trees.getPS(Tree t,
List<String> ruleNames,
String fontName,
int fontSize) |
static String |
Trees.toStringTree(Tree t,
List<String> ruleNames)
Print out a whole tree in LISP form.
|
static String |
Trees.toStringTree(Tree t,
Parser recog)
Print out a whole tree in LISP form.
|
static void |
Trees.writePS(Tree t,
List<String> ruleNames,
String fileName) |
static void |
Trees.writePS(Tree t,
List<String> ruleNames,
String fileName,
String fontName,
int fontSize) |
| Constructor and Description |
|---|
TreePostScriptGenerator(List<String> ruleNames,
Tree root) |
TreePostScriptGenerator(List<String> ruleNames,
Tree root,
String fontName,
int fontSize) |
TreeViewer.DefaultTreeTextProvider(List<String> ruleNames) |
TreeViewer(List<String> ruleNames,
Tree tree) |
| Modifier and Type | Method and Description |
|---|---|
ParseTree |
ParseTreeMatch.get(String label)
Get the last node associated with a specific
label. |
String |
TokenTagToken.getLabel()
Gets the label associated with the rule tag.
|
String |
RuleTagToken.getLabel()
Gets the label associated with the rule tag.
|
ParseTree |
ParseTreeMatch.getMismatchedNode()
Get the node at which we first detected a mismatch.
|
protected ParseTree |
ParseTreePatternMatcher.matchImpl(ParseTree tree,
ParseTree patternTree,
MultiMap<String,ParseTree> labels)
|
| Constructor and Description |
|---|
ParseTreeMatch(ParseTree tree,
ParseTreePattern pattern,
MultiMap<String,ParseTree> labels,
ParseTree mismatchedNode)
Constructs a new instance of
ParseTreeMatch from the specified
parse tree and pattern. |
RuleTagToken(String ruleName,
int bypassTokenType,
String label)
Constructs a new instance of
RuleTagToken with the specified rule
name, bypass token type, and label. |
TokenTagToken(String tokenName,
int type,
String label)
Constructs a new instance of
TokenTagToken with the specified
token name, type, and label. |
Copyright © 1992–2014 ANTLR. All rights reserved.