/external/antlr/tool/src/main/java/org/antlr/tool/ |
D | NFAFactory.java | 67 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 …]
|
D | Interpreter.java | 128 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 …]
|
D | DOTGenerator.java | 187 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 …]
|
D | GrammarSanity.java | 30 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()
|
D | RandomPhrase.java | 32 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()
|
D | GrammarNonDeterminismMessage.java | 33 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()
|
D | RecursionOverflowMessage.java | 33 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/ |
D | LL1Analyzer.java | 59 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 …]
|
D | DecisionProbe.java | 356 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 …]
|
D | StateCluster.java | 34 public NFAState left; 35 public NFAState right; 37 public StateCluster(NFAState left, NFAState right) { in StateCluster()
|
D | NFAState.java | 35 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()
|
D | LL1DFA.java | 53 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()
|
D | RuleClosureTransition.java | 43 public NFAState followState; 46 NFAState ruleStart, in RuleClosureTransition() 47 NFAState followState) in RuleClosureTransition()
|
D | NFAToDFAConverter.java | 140 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 …]
|
D | MachineProbe.java | 116 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/ |
D | RegexNode.cpp | 16 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()
|
D | NFAState.h | 16 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
|
D | NFA.h | 26 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/ |
D | RegexNode.cpp | 16 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()
|
D | NFAState.h | 16 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
|
D | NFA.h | 26 accept.push_back(this->addState(NFAState(++fRegexCount))); in addRegex() 35 int addState(NFAState s) { in addState() 49 std::vector<NFAState> fStates;
|
D | NFAtoDFA.h | 75 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/ |
D | pgen.py | 174 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/ |
D | pgen.py | 174 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/ |
D | metaparser.py | 6 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)
|