Home
last modified time | relevance | path

Searched refs:NFAState (Results 1 – 25 of 46) sorted by relevance

12

/external/antlr/tool/src/main/java/org/antlr/tool/
DNFAFactory.java67 public NFAState newState() { in newState()
68 NFAState n = new NFAState(nfa); in newState()
85 NFAState s = alt.left; in optimizeAlternative()
102 NFAState epsilonTarget = (NFAState)t.target; in optimizeAlternative()
113 s = (NFAState)t.target; in optimizeAlternative()
119 NFAState left = newState(); in build_Atom()
120 NFAState right = newState(); in build_Atom()
137 NFAState left = newState(); in build_Set()
138 NFAState right = newState(); in build_Set()
164 NFAState left = newState(); in build_Range()
[all …]
DInterpreter.java128 List<NFAState> visitedStates) in scan()
147 Stack<NFAState> ruleInvocationStack = new Stack<NFAState>(); in scan()
148 NFAState start = grammar.getRuleStartState(startRule); in scan()
149 NFAState stop = grammar.getRuleStopState(startRule); in scan()
161 List<NFAState> visitedStates) in scan()
171 List<NFAState> visitedStates) in parse()
184 Stack<NFAState> ruleInvocationStack = new Stack<NFAState>(); in parse()
185 NFAState start = grammar.getRuleStartState(startRule); in parse()
186 NFAState stop = grammar.getRuleStopState(startRule); in parse()
197 public ParseTree parse(String startRule, List<NFAState> visitedStates) in parse()
[all …]
DDOTGenerator.java187 if ( ((NFAState)s).isDecisionState() ) { in walkRuleNFACreatingDOT()
188 GrammarAST n = ((NFAState)s).associatedASTNode; in walkRuleNFACreatingDOT()
191 NFAState alt = (NFAState)s; in walkRuleNFACreatingDOT()
195 alt = (NFAState)alt.transition[1].target; in walkRuleNFACreatingDOT()
367 if ( (s instanceof NFAState) && ((NFAState)s).isDecisionState() ) { in getStateLabel()
369 ((NFAState)s).getDecisionNumber(); in getStateLabel()
370 if ( ((NFAState)s).endOfBlockStateNumber!=State.INVALID_STATE_NUMBER ) { in getStateLabel()
371 stateLabel += ",eob="+((NFAState)s).endOfBlockStateNumber; in getStateLabel()
374 else if ( (s instanceof NFAState) && in getStateLabel()
375 ((NFAState)s).endOfBlockStateNumber!=State.INVALID_STATE_NUMBER) in getStateLabel()
[all …]
DGrammarSanity.java30 import org.antlr.analysis.NFAState;
67 Set<NFAState> visitedStates = new HashSet<NFAState>(); in checkAllRulesForLeftRecursion()
89 protected boolean traceStatesLookingForLeftRecursion(NFAState s, in traceStatesLookingForLeftRecursion()
90 Set<NFAState> visitedStates, in traceStatesLookingForLeftRecursion()
124 traceStatesLookingForLeftRecursion((NFAState)t0.target, in traceStatesLookingForLeftRecursion()
125 new HashSet<NFAState>(), in traceStatesLookingForLeftRecursion()
131 NFAState followingState = in traceStatesLookingForLeftRecursion()
142 traceStatesLookingForLeftRecursion((NFAState)t0.target, visitedStates, listOfRecursiveCycles); in traceStatesLookingForLeftRecursion()
150 traceStatesLookingForLeftRecursion((NFAState)t1.target, in traceStatesLookingForLeftRecursion()
DRandomPhrase.java32 import org.antlr.analysis.NFAState;
71 NFAState state = g.getRuleStartState(startRule); in randomPhrase()
72 NFAState stopState = g.getRuleStopState(startRule); in randomPhrase()
74 Stack<NFAState> ruleInvocationStack = new Stack<NFAState>(); in randomPhrase()
86 NFAState invokingState = ruleInvocationStack.pop(); in randomPhrase()
107 state = (NFAState)t0.target; in randomPhrase()
120 NFAState altStartState = in randomPhrase()
123 state = (NFAState)t.target; in randomPhrase()
DGrammarNonDeterminismMessage.java33 import org.antlr.analysis.NFAState;
81 NFAState ruleStart = in toString()
93 NFAState nfaStart = probe.dfa.getNFADecisionStartState(); in toString()
104 List<? extends NFAState> path = in toString()
DRecursionOverflowMessage.java33 import org.antlr.analysis.NFAState;
47 public Collection<? extends Collection<? extends NFAState>> callSiteStates;
53 Collection<? extends Collection<? extends NFAState>> callSiteStates) in RecursionOverflowMessage()
/external/antlr/tool/src/main/java/org/antlr/analysis/
DLL1Analyzer.java59 protected Set<NFAState> lookBusy = new HashSet<NFAState>();
61 public Map<NFAState, LookaheadSet> FIRSTCache = new HashMap<NFAState, LookaheadSet>();
150 public LookaheadSet FIRST(NFAState s) { in FIRST()
170 public LookaheadSet LOOK(NFAState s) { in LOOK()
196 protected LookaheadSet _FIRST(NFAState s, boolean chaseFollowTransitions) { in _FIRST()
236 tset = FIRSTCache.get((NFAState)transition0.target); in _FIRST()
241 tset = _FIRST((NFAState)transition0.target, chaseFollowTransitions); in _FIRST()
244 FIRSTCache.put((NFAState)transition0.target, tset); in _FIRST()
262 NFAState following = ruleInvocationTrans.followState; in _FIRST()
273 _FIRST((NFAState)transition1.target, chaseFollowTransitions); in _FIRST()
[all …]
DDecisionProbe.java356 public List<? extends NFAState> getNFAPathStatesForAlt(int firstAlt, in getNFAPathStatesForAlt()
360 NFAState nfaStart = dfa.getNFADecisionStartState(); in getNFAPathStatesForAlt()
361 List<NFAState> path = new LinkedList<NFAState>(); in getNFAPathStatesForAlt()
364 NFAState s = in getNFAPathStatesForAlt()
370 NFAState altStart = dfa.nfa.grammar.getNFAStateForAltOfDecision(nfaStart,alt); in getNFAPathStatesForAlt()
371 NFAState isolatedAltStart = (NFAState)altStart.transition[0].target; in getNFAPathStatesForAlt()
534 Map<Integer, Map<String, Set<NFAState>>> altToTargetToCallSitesMap = in issueRecursionWarnings()
535 new HashMap<Integer, Map<String, Set<NFAState>>>(); in issueRecursionWarnings()
548 Map<String, Set<NFAState>> targetToCallSiteMap = in issueRecursionWarnings()
551 Collection<Set<NFAState>> callSiteStates = targetToCallSiteMap.values(); in issueRecursionWarnings()
[all …]
DStateCluster.java34 public NFAState left;
35 public NFAState right;
37 public StateCluster(NFAState left, NFAState right) { in StateCluster()
DNFAState.java35 public class NFAState extends State { class
108 public NFAState(NFA nfa) { in NFAState() method in NFAState
132 if ( ((NFAState)e.target).incidentEdgeLabel!=null ) { in addTransition()
135 ((NFAState)e.target).incidentEdgeLabel = e.label; in addTransition()
184 NFAState nfaStart = this; in translateDisplayAltToWalkAlt()
DLL1DFA.java53 public LL1DFA(int decisionNumber, NFAState decisionStartState, LookaheadSet[] altLook) { in LL1DFA()
78 NFAState decisionStartState, in LL1DFA()
155 protected SemanticContext.Predicate getSynPredForAlt(NFAState decisionStartState, in getSynPredForAlt()
160 NFAState altLeftEdge = in getSynPredForAlt()
162 NFAState altStartState = (NFAState)altLeftEdge.transition[0].target; in getSynPredForAlt()
DRuleClosureTransition.java43 public NFAState followState;
46 NFAState ruleStart, in RuleClosureTransition()
47 NFAState followState) in RuleClosureTransition()
DNFAToDFAConverter.java140 NFAState alt = dfa.decisionNFAStartState; in computeStartState()
154 dfa.getNFADecisionStartState().decisionStateType==NFAState.LOOPBACK ) in computeStartState()
159 closure((NFAState)alt.transition[0].target, in computeStartState()
169 closure((NFAState)alt.transition[0].target, in computeStartState()
184 alt = (NFAState)alt.transition[1].target; in computeStartState()
591 public void closure(NFAState p, in closure()
681 NFAState ruleTarget = (NFAState)ref.target; in closure()
686 NFAState whichStateInvokedRule = context.invokingState; in closure()
689 NFAState continueState = edgeToRule.followState; in closure()
708 closure((NFAState)transition0.target, in closure()
[all …]
DMachineProbe.java116 List<Set<NFAState>> nfaStates, List<IntSet> labels) { in getGrammarLocationsForInputSequence()
119 Set<NFAState> cur = nfaStates.get(i); in getGrammarLocationsForInputSequence()
120 Set<NFAState> next = nfaStates.get(i + 1); in getGrammarLocationsForInputSequence()
125 for (NFAState p : cur) { in getGrammarLocationsForInputSequence()
/external/skia/src/sksl/lex/
DRegexNode.cpp16 result.push_back(nfa->addState(NFAState(fPayload.fChar, accept))); in createStates()
38 result.push_back(nfa->addState(NFAState(fPayload.fBool, chars, accept))); in createStates()
47 result.push_back(nfa->addState(NFAState(NFAState::kDot_Kind, accept))); in createStates()
59 int id = nfa->addState(NFAState(placeholder)); in createStates()
62 nfa->fStates[id] = NFAState(result); in createStates()
74 int id = nfa->addState(NFAState(placeholder)); in createStates()
78 nfa->fStates[id] = NFAState(result); in createStates()
DNFAState.h16 struct NFAState { struct
33 NFAState(Kind kind, std::vector<int> next) in NFAState() argument
37 NFAState(char c, std::vector<int> next) in NFAState() function
42 NFAState(std::vector<int> states) in NFAState() argument
46 NFAState(bool inverse, std::vector<bool> accepts, std::vector<int> next) in NFAState() function
55 NFAState(int token) in NFAState() argument
DNFA.h26 accept.push_back(this->addState(NFAState(++fRegexCount))); in addRegex()
35 int addState(NFAState s) { in addState()
49 std::vector<NFAState> fStates;
/external/skqp/src/sksl/lex/
DRegexNode.cpp16 result.push_back(nfa->addState(NFAState(fPayload.fChar, accept))); in createStates()
38 result.push_back(nfa->addState(NFAState(fPayload.fBool, chars, accept))); in createStates()
47 result.push_back(nfa->addState(NFAState(NFAState::kDot_Kind, accept))); in createStates()
59 int id = nfa->addState(NFAState(placeholder)); in createStates()
62 nfa->fStates[id] = NFAState(result); in createStates()
74 int id = nfa->addState(NFAState(placeholder)); in createStates()
78 nfa->fStates[id] = NFAState(result); in createStates()
DNFAState.h16 struct NFAState { struct
33 NFAState(Kind kind, std::vector<int> next) in NFAState() argument
37 NFAState(char c, std::vector<int> next) in NFAState() function
42 NFAState(std::vector<int> states) in NFAState() argument
46 NFAState(bool inverse, std::vector<bool> accepts, std::vector<int> next) in NFAState() function
55 NFAState(int token) in NFAState() function
DNFA.h26 accept.push_back(this->addState(NFAState(++fRegexCount))); in addRegex()
35 int addState(NFAState s) { in addState()
49 std::vector<NFAState> fStates;
DNFAtoDFA.h75 NFAState state = fNFA.fStates[nfaState]; in add()
76 if (state.fKind == NFAState::kRemapped_Kind) { in add()
107 const NFAState& nfaState = fNFA.fStates[idx]; in scanState()
110 if (fNFA.fStates[nextState].fKind == NFAState::kAccept_Kind) { in scanState()
/external/python/cpython2/Lib/lib2to3/pgen2/
Dpgen.py174 assert isinstance(start, NFAState)
175 assert isinstance(finish, NFAState)
181 assert isinstance(state, NFAState)
255 aa = NFAState()
256 zz = NFAState()
304 a = NFAState()
305 z = NFAState()
337 class NFAState(object): class
344 assert isinstance(next, NFAState)
351 assert isinstance(iter(nfaset).next(), NFAState)
[all …]
/external/python/cpython3/Lib/lib2to3/pgen2/
Dpgen.py174 assert isinstance(start, NFAState)
175 assert isinstance(finish, NFAState)
181 assert isinstance(state, NFAState)
255 aa = NFAState()
256 zz = NFAState()
304 a = NFAState()
305 z = NFAState()
337 class NFAState(object): class
344 assert isinstance(next, NFAState)
351 assert isinstance(next(iter(nfaset)), NFAState)
[all …]
/external/python/cpython3/Parser/pgen/
Dmetaparser.py6 from .automata import NFA, NFAState
49 aa = NFAState(self._current_rule_name)
50 zz = NFAState(self._current_rule_name)
112 a = NFAState(self._current_rule_name)
113 z = NFAState(self._current_rule_name)

12