Package | Description |
---|---|
org.antlr.v4.runtime | |
org.antlr.v4.runtime.atn | |
org.antlr.v4.runtime.dfa | |
org.antlr.v4.runtime.misc | |
org.antlr.v4.runtime.tree | |
org.antlr.v4.runtime.tree.gui |
Modifier and Type | Field and Description |
---|---|
protected List<ParseTreeListener> |
Parser._parseListeners
The list of
ParseTreeListener listeners registered to receive
events during the parse. |
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.
|
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) |
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) |
void |
TokenStreamRewriter.replace(String programName,
int from,
int to,
Object text) |
void |
TokenStreamRewriter.replace(String programName,
Token from,
Token to,
Object text) |
void |
DiagnosticErrorListener.reportAmbiguity(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
boolean exact,
BitSet ambigAlts,
ATNConfigSet configs) |
void |
DiagnosticErrorListener.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 |
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 |
---|---|
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) |
protected LexerATNConfig |
LexerATNSimulator.getEpsilonTarget(CharStream input,
LexerATNConfig config,
Transition t,
ATNConfigSet configs,
boolean speculative) |
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.
|
protected ATNState |
ParserATNSimulator.getReachableTarget(Transition trans,
int ttype) |
protected ATNState |
LexerATNSimulator.getReachableTarget(Transition trans,
int t) |
IntervalSet |
Transition.label() |
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) |
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 |
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 |
ParserATNSimulator.reportAttemptingFullContext(DFA dfa,
BitSet conflictingAlts,
ATNConfigSet configs,
int startIndex,
int stopIndex) |
String |
PredictionContext.toString(Recognizer<?,?> recog) |
String |
ATNConfig.toString(Recognizer<?,?> recog,
boolean showAlt) |
String |
PredictionContext.toString(Recognizer<?,?> recog,
RuleContext stop) |
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) |
LexerATNConfig(ATNState state,
int alt,
PredictionContext context) |
LexerATNConfig(ATNState state,
int alt,
PredictionContext context,
int actionIndex) |
LexerATNConfig(LexerATNConfig c,
ATNState state,
PredictionContext context) |
LexerATNSimulator(Lexer recog,
ATN atn,
DFA[] decisionToDFA,
PredictionContextCache sharedContextCache) |
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 |
---|---|
boolean |
Array2DHashSet.containsFast(T obj) |
void |
LogManager.log(String component,
String msg) |
boolean |
Array2DHashSet.removeFast(T obj) |
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) |
Copyright © 1992-2013 ANTLR. All Rights Reserved.