Uses of Class
org.antlr.analysis.NFAState
Packages that use NFAState
-
Uses of NFAState in org.antlr.analysis
Fields in org.antlr.analysis declared as NFAStateModifier and TypeFieldDescriptionFrom what NFAState did we create the DFA?RuleClosureTransition.followState
What node to begin computations following ref to ruleNFAContext.invokingState
The NFA state that invoked another rule's start state is recorded on the rule invocation context stack.StateCluster.left
StateCluster.right
Fields in org.antlr.analysis with type parameters of type NFAStateModifier and TypeFieldDescriptionLL1Analyzer.FIRSTCache
LL1Analyzer.lookBusy
Used during LOOK to detect computation cyclesMethods in org.antlr.analysis that return NFAStateMethods in org.antlr.analysis that return types with arguments of type NFAStateModifier and TypeMethodDescriptionDecisionProbe.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.Methods in org.antlr.analysis with parameters of type NFAStateModifier and TypeMethodDescriptionprotected int
LL1Analyzer._detectConfoundingPredicates
(NFAState s, Rule enclosingRule, boolean chaseFollowTransitions) protected LookaheadSet
protected SemanticContext
LL1Analyzer._getPredicates
(NFAState s, NFAState altStartState) 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
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.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.LL1Analyzer.getPredicates
(NFAState altStartState) Return predicate expression found via epsilon edges from s.protected SemanticContext.Predicate
LL1DFA.getSynPredForAlt
(NFAState decisionStartState, int alt) Method parameters in org.antlr.analysis with type arguments of type NFAStateModifier and TypeMethodDescriptionList
<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.Constructors in org.antlr.analysis with parameters of type NFAStateModifierConstructorDescriptionLL1DFA
(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) -
Uses of NFAState in org.antlr.grammar.v3
Methods in org.antlr.grammar.v3 with parameters of type NFAStateModifier and TypeMethodDescriptionprotected void
TreeToNFAConverter.addFollowTransition
(String ruleName, NFAState following) -
Uses of NFAState in org.antlr.tool
Fields in org.antlr.tool declared as NFAStateModifier and TypeFieldDescriptionGrammarAST.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.GrammarAST.NFAStartState
What NFA start state was built from this node?GrammarAST.NFATreeDownState
This is used for TREE_BEGIN nodes to point into the NFA.Grammar.Decision.startState
Rule.startState
Rule.stopState
Fields in org.antlr.tool with type parameters of type NFAStateModifier and TypeFieldDescriptionCollection
<? extends Collection<? extends NFAState>> RecursionOverflowMessage.callSiteStates
CompositeGrammar.numberToStateList
The NFA states in the NFA built from rules across grammars in composite.CompositeGrammar.refClosureBusy
Used during getRuleReferenceClosure to detect computation cyclesMethods in org.antlr.tool that return NFAStateModifier and TypeMethodDescriptionGrammar.getDecisionNFAStartState
(int decision) GrammarAST.getNFAStartState()
Grammar.getNFAStateForAltOfDecision
(NFAState decisionState, int alt) Get the ith alternative (1..n) from a decision; return null when an invalid alt is requested.Grammar.getRuleStartState
(String ruleName) Grammar.getRuleStartState
(String scopeName, String ruleName) Grammar.getRuleStopState
(String ruleName) CompositeGrammar.getState
(int s) NFAFactory.newState()
Methods in org.antlr.tool that return types with arguments of type NFAStateMethods in org.antlr.tool with parameters of type NFAStateModifier and TypeMethodDescriptionvoid
int
Grammar.assignDecisionNumber
(NFAState state) private void
NFAFactory.build_EOFState
(NFAState endNFAState) set up an NFA NFAState that will yield eof tokens or, in the case of a lexer grammar, an EOT token when the conversion hits the end of a rule.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.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).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 parsevoid
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.private void
NFAFactory.transitionBetweenStates
(NFAState a, NFAState b, int label) Method parameters in org.antlr.tool with type arguments of type NFAStateModifier and TypeMethodDescriptionorg.antlr.runtime.tree.ParseTree
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 parseprotected 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 parseorg.antlr.runtime.CommonToken
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.