HomeSort by relevance Sort by last modified time
    Searched refs:NFA (Results 1 - 25 of 45) sorted by null

1 2

  /external/antlr/antlr-3.4/tool/src/main/java/org/antlr/analysis/
NFA.java 33 /** An NFA (collection of NFAStates) constructed from a grammar. This
34 * NFA is one big machine for entire grammar. Decision points are recorded
36 * the NFA (interpret a decision).
38 public class NFA {
41 /** This NFA represents which grammar? */
44 /** Which factory created this NFA? */
49 public NFA(Grammar g) {
NFAState.java 34 /** A state within an NFA. At most 2 transitions emanate from any NFA state. */
36 // I need to distinguish between NFA decision states for (...)* and (...)+
37 // during NFA interpretation.
50 /** For o-A->o type NFA tranitions, record the label that leads to this
56 /** Which NFA are we in? */
57 public NFA nfa = null; field in class:NFAState
63 * the NFA created for them. They both have a loop-exit-or-stay-in
108 public NFAState(NFA nfa)
    [all...]
DFAState.java 38 /** A DFA state represents a set of possible NFA configurations.
40 * to keep track of all possible states the NFA can be in after
43 * subset T of the states of the NFA that are reachable from the
44 * NFA's start state along some path labeled a1a2..an."
45 * In conventional NFA->DFA conversion, therefore, the subset T
47 * NFA could be in. We need to track the alt predicted by each
53 * the underlying LL grammar from which the NFA was derived.
67 public static final int PREDICTED_ALT_UNSET = NFA.INVALID_ALT_NUMBER-1;
87 /** The NFA->DFA algorithm may terminate leaving some states
95 /** Rather than recheck every NFA configuration in a DFA state (afte
    [all...]
LL1DFA.java 54 nfa = decisionStartState.nfa;
55 nAlts = nfa.grammar.getNumberOfAltsForDecisionNFA(decisionStartState);
80 nfa = decisionStartState.nfa;
81 nAlts = nfa.grammar.getNumberOfAltsForDecisionNFA(decisionStartState);
107 s.cachedUniquelyPredicatedAlt = NFA.INVALID_ALT_NUMBER;
119 NFAState altLeftEdge = nfa.grammar.getNFAStateForAltOfDecision(decisionStartState, walkAlt);
121 SemanticContext ctx = nfa.grammar.ll1Analyzer.getPredicates(altStartState);
158 nfa.grammar.getNFAStateForAltOfDecision(decisionStartState, walkAlt)
    [all...]
  /packages/apps/Nfc/nci/jni/
Android.mk 2 NFA := $(VOB_COMPONENTS)/nfa
24 $(NFA)/include \
25 $(NFA)/brcm \
  /external/antlr/antlr-3.4/tool/src/test/java/org/antlr/test/
TestDFAMatching.java 31 import org.antlr.analysis.NFA;
52 checkPrediction(dfa,"d", NFA.INVALID_ALT_NUMBER);
79 checkPrediction(dfa,"q", NFA.INVALID_ALT_NUMBER);
92 checkPrediction(dfa,".2", NFA.INVALID_ALT_NUMBER);
  /external/antlr/antlr-3.4/tool/src/main/resources/org/antlr/tool/templates/dot/
dot.stg 34 digraph NFA {
42 nfa(decisionRanks,states,edges,rankdir,startState) ::= <<
43 digraph NFA {
  /external/skia/src/sksl/lex/
NFA.h 15 * A nondeterministic finite automaton for matching regular expressions. The NFA is initialized with
18 struct NFA {
33 * Adds a new state to the NFA, returning its index.
41 * Matches a string against all of the regexes added to this NFA. Returns the index of the first
43 * only for debugging purposes; the NFA should be converted to a DFA before actual use.
RegexNode.h 14 struct NFA;
61 * Creates NFA states for this node, with a successful match against this node resulting in a
64 std::vector<int> createStates(NFA* nfa, const std::vector<int>& accept) const;
NFA.cpp 8 #include "NFA.h"
10 int NFA::match(std::string s) const {
NFAtoDFA.h 10 #include "NFA.h"
22 * DFAs differ only in that an NFA allows multiple states at the same time, we can find each
23 * possible combination of simultaneous NFA states and give this combination a label. These labelled
24 * nodes are our DFA nodes, since we can only be in one such unique set of NFA states at a time.
26 * As an NFA can end up in multiple accept states at the same time (for instance, the token "while"
28 * (in terms of the order in which they were added to the NFA).
35 NFAtoDFA(NFA* nfa)
36 : fNFA(*nfa) {}
39 * Returns a DFA created from the NFA
    [all...]
RegexNode.cpp 10 #include "NFA.h"
12 std::vector<int> RegexNode::createStates(NFA* nfa, const std::vector<int>& accept) const {
16 result.push_back(nfa->addState(NFAState(fPayload.fChar, accept)));
38 result.push_back(nfa->addState(NFAState(fPayload.fBool, chars, accept)));
42 std::vector<int> right = fChildren[1].createStates(nfa, accept);
43 result = fChildren[0].createStates(nfa, right);
47 result.push_back(nfa->addState(NFAState(NFAState::kDot_Kind, accept)));
50 std::vector<int> states = fChildren[0].createStates(nfa, accept);
52 states = fChildren[1].createStates(nfa, accept)
    [all...]
Main.cpp 166 NFA nfa; local
187 nfa.addRegex(node);
190 nfa.addRegex(RegexParser().parse(pattern));
194 NFAtoDFA converter(&nfa);
  /external/skqp/src/sksl/lex/
NFA.h 15 * A nondeterministic finite automaton for matching regular expressions. The NFA is initialized with
18 struct NFA {
33 * Adds a new state to the NFA, returning its index.
41 * Matches a string against all of the regexes added to this NFA. Returns the index of the first
43 * only for debugging purposes; the NFA should be converted to a DFA before actual use.
RegexNode.h 14 struct NFA;
61 * Creates NFA states for this node, with a successful match against this node resulting in a
64 std::vector<int> createStates(NFA* nfa, const std::vector<int>& accept) const;
NFA.cpp 8 #include "NFA.h"
10 int NFA::match(std::string s) const {
NFAtoDFA.h 10 #include "NFA.h"
22 * DFAs differ only in that an NFA allows multiple states at the same time, we can find each
23 * possible combination of simultaneous NFA states and give this combination a label. These labelled
24 * nodes are our DFA nodes, since we can only be in one such unique set of NFA states at a time.
26 * As an NFA can end up in multiple accept states at the same time (for instance, the token "while"
28 * (in terms of the order in which they were added to the NFA).
35 NFAtoDFA(NFA* nfa)
36 : fNFA(*nfa) {}
39 * Returns a DFA created from the NFA
    [all...]
RegexNode.cpp 10 #include "NFA.h"
12 std::vector<int> RegexNode::createStates(NFA* nfa, const std::vector<int>& accept) const {
16 result.push_back(nfa->addState(NFAState(fPayload.fChar, accept)));
38 result.push_back(nfa->addState(NFAState(fPayload.fBool, chars, accept)));
42 std::vector<int> right = fChildren[1].createStates(nfa, accept);
43 result = fChildren[0].createStates(nfa, right);
47 result.push_back(nfa->addState(NFAState(NFAState::kDot_Kind, accept)));
50 std::vector<int> states = fChildren[0].createStates(nfa, accept);
52 states = fChildren[1].createStates(nfa, accept)
    [all...]
Main.cpp 166 NFA nfa; local
187 nfa.addRegex(node);
190 nfa.addRegex(RegexParser().parse(pattern));
194 NFAtoDFA converter(&nfa);
  /external/antlr/antlr-3.4/tool/src/main/java/org/antlr/codegen/
ACyclicDFACodeGenerator.java 95 int EOTPredicts = NFA.INVALID_ALT_NUMBER;
158 if ( EOTPredicts!=NFA.INVALID_ALT_NUMBER ) {
  /device/linaro/bootloader/edk2/BaseTools/Source/C/VfrCompile/Pccts/dlg/
automata.c 76 /* adds a new nfa to the binary tree and returns a pointer to it */
116 /* past a pointer to the start start of the nfa graph
152 /* Add NFA states reached by a from d_state */
221 /* Returns a pointer to a dfa node that has the same nfa nodes in it.
270 node = NFA(*e);
304 node = NFA(*e);
dlg.h 92 /******** macros for accessing the NFA and DFA nodes ****/
93 #define NFA(x) (nfa_array[x])
136 extern nfa_node **nfa_array; /* start of nfa "array" */
output.c 488 /* with respect to nfa node numbers and set_pdq */
490 while((*nfa_i != nil) && (!(accept = NFA(*nfa_i)->accept))){
498 set_orel(NFA(*nfa_i)->accept, &accept_set);
721 /* print out a particular nfa node that is pointed to by p */
733 printf("NFA state : %d\naccept state : %d\n",
800 printf("from nfa states : ");
822 p_dfa_node(NFA(i));
  /external/antlr/antlr-3.4/tool/src/main/java/org/antlr/tool/
Interpreter.java 114 /** For a given input char stream, try to match against the NFA
116 * it is using an NFA because it uses DFAs at each decision point to
210 /** Fill a list of all NFA states visited during the parse */
222 actions.enterRule(s.nfa.grammar.getFileName(), start.enclosingRule.name);
231 s.nfa.grammar.getTokenDisplayName(t));
234 if ( s.getDecisionNumber()>0 && s.nfa.grammar.getNumberOfAltsForDecisionNFA(s)>1 ) {
236 DFA dfa = s.nfa.grammar.getLookaheadDFA(s.getDecisionNumber());
238 if ( s.nfa.grammar.type!=Grammar.LEXER ) {
241 " input="+s.nfa.grammar.getTokenDisplayName(t));
246 if ( predictedAlt == NFA.INVALID_ALT_NUMBER )
    [all...]
  /external/antlr/antlr-3.4/tool/src/main/resources/org/antlr/tool/templates/messages/languages/
en.stg 238 <paths:{ it | alt <it.alt> via NFA path <it.states; separator=","><\n>}>
280 <paths:{ it | alt <it.alt> via NFA path <it.states; separator=","><\n>}>

Completed in 2158 milliseconds

1 2