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.followStateWhat node to begin computations following ref to ruleNFAContext.invokingStateThe NFA state that invoked another rule's start state is recorded on the rule invocation context stack.StateCluster.leftStateCluster.rightFields in org.antlr.analysis with type parameters of type NFAStateModifier and TypeFieldDescriptionLL1Analyzer.FIRSTCacheLL1Analyzer.lookBusyUsed 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 intLL1Analyzer._detectConfoundingPredicates(NFAState s, Rule enclosingRule, boolean chaseFollowTransitions) protected LookaheadSetprotected SemanticContextLL1Analyzer._getPredicates(NFAState s, NFAState altStartState) DFAState.addNFAConfiguration(NFAState state, int alt, NFAContext context, SemanticContext semanticContext) voidDFAState.addNFAConfiguration(NFAState state, NFAConfiguration c) Add an NFA configuration to this DFA node.voidvoidNFAToDFAConverter.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.booleanLL1Analyzer.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 booleanDecisionProbe.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.PredicateLL1DFA.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 voidTreeToNFAConverter.addFollowTransition(String ruleName, NFAState following) -
Uses of NFAState in org.antlr.tool
Fields in org.antlr.tool declared as NFAStateModifier and TypeFieldDescriptionGrammarAST.followingNFAStateRule 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.NFAStartStateWhat NFA start state was built from this node?GrammarAST.NFATreeDownStateThis is used for TREE_BEGIN nodes to point into the NFA.Grammar.Decision.startStateRule.startStateRule.stopStateFields in org.antlr.tool with type parameters of type NFAStateModifier and TypeFieldDescriptionCollection<? extends Collection<? extends NFAState>> RecursionOverflowMessage.callSiteStatesCompositeGrammar.numberToStateListThe NFA states in the NFA built from rules across grammars in composite.CompositeGrammar.refClosureBusyUsed 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 TypeMethodDescriptionvoidintGrammar.assignDecisionNumber(NFAState state) private voidNFAFactory.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.intGrammar.getNumberOfAltsForDecisionNFA(NFAState decisionState) Decisions are linked together with transition(1).protected voidInterpreter.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 parsevoidGrammar.setDecisionNFA(int decision, NFAState state) voidGrammarAST.setNFAStartState(NFAState nfaStartState) protected booleanGrammarSanity.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 voidNFAFactory.transitionBetweenStates(NFAState a, NFAState b, int label) Method parameters in org.antlr.tool with type arguments of type NFAStateModifier and TypeMethodDescriptionorg.antlr.runtime.tree.ParseTreevoidInterpreter.parse(String startRule, org.antlr.runtime.debug.DebugEventListener actions, List<NFAState> visitedStates) protected voidInterpreter.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 voidInterpreter.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.CommonTokenvoidInterpreter.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 booleanGrammarSanity.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.