Package | Description |
---|---|
org.antlr.analysis | |
org.antlr.grammar.v3 | |
org.antlr.tool |
Modifier and Type | Field | Description |
---|---|---|
NFAState |
DFA.decisionNFAStartState |
From what NFAState did we create the DFA?
|
NFAState |
RuleClosureTransition.followState |
What node to begin computations following ref to rule
|
NFAState |
NFAContext.invokingState |
The NFA state that invoked another rule's start state is recorded
on the rule invocation context stack.
|
NFAState |
StateCluster.left |
|
NFAState |
StateCluster.right |
Modifier and Type | Field | Description |
---|---|---|
Map<NFAState,LookaheadSet> |
LL1Analyzer.FIRSTCache |
|
protected Set<NFAState> |
LL1Analyzer.lookBusy |
Used during LOOK to detect computation cycles
|
Modifier and Type | Method | Description |
---|---|---|
NFAState |
DFA.getNFADecisionStartState() |
|
NFAState |
NFA.getState(int s) |
Modifier and Type | Method | Description |
---|---|---|
List<? extends NFAState> |
DecisionProbe.getNFAPathStatesForAlt(int firstAlt,
int alt,
List<? extends Label> labels) |
Given an alternative associated with a nondeterministic DFA state,
find the path of NFA states associated with the labels sequence.
|
Modifier and Type | Method | Description |
---|---|---|
protected int |
LL1Analyzer._detectConfoundingPredicates(NFAState s,
Rule enclosingRule,
boolean chaseFollowTransitions) |
|
protected LookaheadSet |
LL1Analyzer._FIRST(NFAState s,
boolean chaseFollowTransitions) |
|
protected SemanticContext |
LL1Analyzer._getPredicates(NFAState s,
NFAState altStartState) |
|
NFAConfiguration |
DFAState.addNFAConfiguration(NFAState state,
int alt,
NFAContext context,
SemanticContext semanticContext) |
|
void |
DFAState.addNFAConfiguration(NFAState state,
NFAConfiguration c) |
Add an NFA configuration to this DFA node.
|
void |
NFA.addState(NFAState state) |
|
void |
NFAToDFAConverter.closure(NFAState p,
int alt,
NFAContext context,
SemanticContext semanticContext,
DFAState d,
boolean collectPredicates) |
Where can we get from NFA state p traversing only epsilon transitions?
Add new NFA states + context to DFA state d.
|
boolean |
LL1Analyzer.detectConfoundingPredicates(NFAState s) |
Is there a non-syn-pred predicate visible from s that is not in
the rule enclosing s? This accounts for most predicate situations
and lets ANTLR do a simple LL(1)+pred computation.
|
LookaheadSet |
LL1Analyzer.FIRST(NFAState s) |
From an NFA state, s, find the set of all labels reachable from s.
|
protected boolean |
DecisionProbe.getNFAPath(NFAState s,
int labelIndex,
List<? extends Label> labels,
List<? super NFAState> path) |
Given a sample input sequence, you usually would like to know the
path taken through the NFA.
|
SemanticContext |
LL1Analyzer.getPredicates(NFAState altStartState) |
Return predicate expression found via epsilon edges from s.
|
protected SemanticContext.Predicate |
LL1DFA.getSynPredForAlt(NFAState decisionStartState,
int alt) |
|
LookaheadSet |
LL1Analyzer.LOOK(NFAState s) |
Modifier and Type | Method | Description |
---|---|---|
List<org.antlr.runtime.Token> |
MachineProbe.getGrammarLocationsForInputSequence(List<Set<NFAState>> nfaStates,
List<IntSet> labels) |
Given an alternative associated with a DFA state, return the list of
tokens (from grammar) associated with path through NFA following the
labels sequence.
|
Constructor | Description |
---|---|
DFA(int decisionNumber,
NFAState decisionStartState) |
|
LL1DFA(int decisionNumber,
NFAState decisionStartState,
LookaheadSet[] altLook) |
From list of lookahead sets (one per alt in decision), create
an LL(1) DFA.
|
LL1DFA(int decisionNumber,
NFAState decisionStartState,
MultiMap<IntervalSet,Integer> edgeMap) |
From a set of edgeset→list-of-alts mappings, create a DFA
that uses syn preds for all |list-of-alts|>1.
|
NFAContext(NFAContext parent,
NFAState invokingState) |
|
RuleClosureTransition(Rule rule,
NFAState ruleStart,
NFAState followState) |
|
StateCluster(NFAState left,
NFAState right) |
Modifier and Type | Method | Description |
---|---|---|
protected void |
TreeToNFAConverter.addFollowTransition(String ruleName,
NFAState following) |
Modifier and Type | Field | Description |
---|---|---|
NFAState |
GrammarAST.followingNFAState |
Rule ref nodes, token refs, set, and NOT set refs need to track their
location in the generated NFA so that local FOLLOW sets can be
computed during code gen for automatic error recovery.
|
NFAState |
GrammarAST.NFAStartState |
What NFA start state was built from this node?
|
NFAState |
GrammarAST.NFATreeDownState |
This is used for TREE_BEGIN nodes to point into
the NFA.
|
NFAState |
Grammar.Decision.startState |
|
NFAState |
Rule.startState |
|
NFAState |
Rule.stopState |
Modifier and Type | Field | Description |
---|---|---|
Collection<? extends Collection<? extends NFAState>> |
RecursionOverflowMessage.callSiteStates |
|
protected Vector<NFAState> |
CompositeGrammar.numberToStateList |
The NFA states in the NFA built from rules across grammars in composite.
|
protected Set<NFAState> |
CompositeGrammar.refClosureBusy |
Used during getRuleReferenceClosure to detect computation cycles
|
Modifier and Type | Method | Description |
---|---|---|
NFAState |
Grammar.getDecisionNFAStartState(int decision) |
|
NFAState |
GrammarAST.getNFAStartState() |
|
NFAState |
Grammar.getNFAStateForAltOfDecision(NFAState decisionState,
int alt) |
Get the ith alternative (1..n) from a decision; return null when
an invalid alt is requested.
|
NFAState |
Grammar.getRuleStartState(String ruleName) |
|
NFAState |
Grammar.getRuleStartState(String scopeName,
String ruleName) |
|
NFAState |
Grammar.getRuleStopState(String ruleName) |
|
NFAState |
CompositeGrammar.getState(int s) |
|
NFAState |
NFAFactory.newState() |
Modifier and Type | Method | Description |
---|---|---|
List<NFAState> |
Grammar.getDecisionNFAStartStateList() |
Modifier and Type | Method | Description |
---|---|---|
void |
CompositeGrammar.addState(NFAState state) |
|
int |
Grammar.assignDecisionNumber(NFAState state) |
|
StateCluster |
NFAFactory.build_RuleRef(Rule refDef,
NFAState ruleStart) |
For reference to rule r, build
o-e->(r) o
where (r) is the start of rule r and the trailing o is not linked
to from rule ref state directly (it's done thru the transition(0)
RuleClosureTransition.
|
LookaheadSet |
Grammar.FIRST(NFAState s) |
|
NFAState |
Grammar.getNFAStateForAltOfDecision(NFAState decisionState,
int alt) |
Get the ith alternative (1..n) from a decision; return null when
an invalid alt is requested.
|
int |
Grammar.getNumberOfAltsForDecisionNFA(NFAState decisionState) |
Decisions are linked together with transition(1).
|
LookaheadSet |
Grammar.LOOK(NFAState s) |
|
protected void |
Interpreter.parseEngine(String startRule,
NFAState start,
NFAState stop,
org.antlr.runtime.IntStream input,
Stack<NFAState> ruleInvocationStack,
org.antlr.runtime.debug.DebugEventListener actions,
List<NFAState> visitedStates) |
Fill a list of all NFA states visited during the parse
|
void |
Grammar.setDecisionNFA(int decision,
NFAState state) |
|
void |
GrammarAST.setNFAStartState(NFAState nfaStartState) |
|
protected boolean |
GrammarSanity.traceStatesLookingForLeftRecursion(NFAState s,
Set<NFAState> visitedStates,
List<Set<Rule>> listOfRecursiveCycles) |
From state s, look for any transition to a rule that is currently
being traced.
|
Modifier and Type | Method | Description |
---|---|---|
org.antlr.runtime.tree.ParseTree |
Interpreter.parse(String startRule,
List<NFAState> visitedStates) |
|
void |
Interpreter.parse(String startRule,
org.antlr.runtime.debug.DebugEventListener actions,
List<NFAState> visitedStates) |
|
protected void |
Interpreter.parseEngine(String startRule,
NFAState start,
NFAState stop,
org.antlr.runtime.IntStream input,
Stack<NFAState> ruleInvocationStack,
org.antlr.runtime.debug.DebugEventListener actions,
List<NFAState> visitedStates) |
Fill a list of all NFA states visited during the parse
|
protected void |
Interpreter.parseEngine(String startRule,
NFAState start,
NFAState stop,
org.antlr.runtime.IntStream input,
Stack<NFAState> ruleInvocationStack,
org.antlr.runtime.debug.DebugEventListener actions,
List<NFAState> visitedStates) |
Fill a list of all NFA states visited during the parse
|
org.antlr.runtime.CommonToken |
Interpreter.scan(String startRule,
List<NFAState> visitedStates) |
|
void |
Interpreter.scan(String startRule,
org.antlr.runtime.debug.DebugEventListener actions,
List<NFAState> visitedStates) |
For a given input char stream, try to match against the NFA
starting at startRule.
|
protected boolean |
GrammarSanity.traceStatesLookingForLeftRecursion(NFAState s,
Set<NFAState> visitedStates,
List<Set<Rule>> listOfRecursiveCycles) |
From state s, look for any transition to a rule that is currently
being traced.
|
Copyright © 1992–2019 ANTLR. All rights reserved.