HomeSort by relevance Sort by last modified time
    Searched defs:dfa (Results 1 - 25 of 28) sorted by null

1 2

  /external/antlr/antlr-3.4/tool/src/test/java/org/antlr/test/
TestDFAMatching.java 30 import org.antlr.analysis.DFA;
48 DFA dfa = g.getLookaheadDFA(1); local
49 checkPrediction(dfa,"a",1);
50 checkPrediction(dfa,"b",2);
51 checkPrediction(dfa,"c",3);
52 checkPrediction(dfa,"d", NFA.INVALID_ALT_NUMBER);
61 DFA dfa = g.getLookaheadDFA(1); local
62 checkPrediction(dfa,"a",1)
75 DFA dfa = g.getLookaheadDFA(1); local
89 DFA dfa = g.getLookaheadDFA(3); local
    [all...]
TestCharDFAConversion.java 30 import org.antlr.analysis.DFA;
223 DFA dfa = g.getLookaheadDFA(1); local
224 String result = serializer.serialize(dfa.startState);
264 // same DFA as nongreedy .* but code gen checks number of
382 // less efficient of a DFA
524 DFA dfa = g.getLookaheadDFA(decision); local
525 assertNotNull("unknown decision #"+decision, dfa);
527 String result = serializer.serialize(dfa.startState)
    [all...]
TestCompositeGrammars.java 632 org.antlr.analysis.DFA dfa = g.getLookaheadDFA(1); local
634 String result = serializer.serialize(dfa.startState);
680 "b : 'x' | 'y' {;} ;\n"; // preds generated but not need in DFA here
    [all...]
TestSemanticPredicates.java 30 import org.antlr.analysis.DFA;
262 DFA dfa = g.getLookaheadDFA(1); local
263 assertEquals(null, dfa); // can't analyze.
266 String result = serializer.serialize(dfa.startState);
636 * alt 1 in rule 'a', it is unnecessary to continue NFA->DFA
714 /** For a DFA state with lots of configurations that have the same
815 DFA dfa = g.getLookaheadDFA(decision); local
817 String result = serializer.serialize(dfa.startState)
    [all...]
TestDFAConversion.java 31 import org.antlr.analysis.DFA;
315 "options {k=2;}\n" + // just makes bigger DFA
410 // Should be ok like k=1 'except bigger DFA
1640 DFA dfa = g.getLookaheadDFA(decision); local
    [all...]
  /external/antlr/antlr-3.4/tool/src/main/java/org/antlr/analysis/
NFAToDFAConverter.java 37 /** Code that embodies the NFA conversion to DFA. A new object is needed
38 * per DFA (also required for thread safety if multiple conversions
42 /** A list of DFA states we still need to process during NFA conversion */
54 /** We are converting which DFA? */
55 protected DFA dfa; field in class:NFAToDFAConverter
70 public NFAToDFAConverter(DFA dfa) {
71 this.dfa = dfa;
    [all...]
DFAOptimizer.java 39 * PRUNE_EBNF_EXIT_BRANCHES) during DFA construction, but then it
42 * during DFA construction and before determinism checks.
44 * In general, ANTLR's NFA->DFA->codegen pipeline seems very robust
47 * within the confines of, for example, a DFA. The code generator
100 * Tokens rule DFA goes
110 * Done during DFA construction. See method addTransition() in
115 * Done during DFA construction. See addDFAState() in NFAToDFAConverter.
123 /** Used by DFA state machine generator to avoid infinite recursion
124 * resulting from cycles int the DFA. This is a set of int state #s.
137 // optimize each DFA in this gramma
142 DFA dfa = grammar.getLookaheadDFA(decisionNumber); local
    [all...]
MachineProbe.java 42 DFA dfa; field in class:MachineProbe
44 public MachineProbe(DFA dfa) {
45 this.dfa = dfa;
50 return getAnyDFAPathToTarget(dfa.startState, targetState, visited);
85 // walk looking for edge whose target is next dfa state
109 * Given an alternative associated with a DFA state, return the list of
148 // /** Used to find paths through syntactically ambiguous DFA. If we'v
    [all...]
DecisionProbe.java 41 * discovered while building the DFA predictor.
43 * The information is collected during NFA->DFA conversion and, while
60 * is represented internall with a DFA comprised of multiple states, each of
63 * Because of this, you need to iterate over this list of DFA states. You'll
72 public DFA dfa; field in class:DecisionProbe
74 /** Track all DFA states with nondeterministic alternatives.
75 * By reaching the same DFA state, a path through the NFA for some input
79 * Note that from the DFA state, you can ask for
92 /** Was a syntactic ambiguity resolved with predicates? Any DFA
    [all...]
DFAState.java 38 /** A DFA state represents a set of possible NFA configurations.
39 * As Aho, Sethi, Ullman p. 117 says "The DFA uses its state
42 * input a1a2..an, the DFA is in a state that represents the
45 * In conventional NFA->DFA conversion, therefore, the subset T
61 * A DFA state may have multiple references to a particular state,
69 /** We are part of what DFA? Use this ref to get access to the
72 public DFA dfa; field in class:DFAState
74 /** Track the transitions emanating from this DFA state. The List
80 /** When doing an acyclic DFA, this is the number of lookahead symbol
    [all...]
  /prebuilts/python/darwin-x86/2.7.5/include/python2.7/
grammar.h 35 /* A state in a DFA */
48 /* A DFA */
57 } dfa; typedef in typeref:struct:__anon62287
63 dfa *g_dfa; /* Array of DFAs */
72 dfa *adddfa(grammar *g, int type, char *name);
73 int addstate(dfa *d);
74 void addarc(dfa *d, int from, int to, int lbl);
75 dfa *PyGrammar_FindDFA(grammar *g, int type);
  /prebuilts/python/linux-x86/2.7.5/include/python2.7/
grammar.h 35 /* A state in a DFA */
48 /* A DFA */
57 } dfa; typedef in typeref:struct:__anon62410
63 dfa *g_dfa; /* Array of DFAs */
72 dfa *adddfa(grammar *g, int type, char *name);
73 int addstate(dfa *d);
74 void addarc(dfa *d, int from, int to, int lbl);
75 dfa *PyGrammar_FindDFA(grammar *g, int type);
  /external/antlr/antlr-3.4/antlr3-maven-plugin/src/main/java/org/antlr/mojo/antlr3/
Antlr3Mojo.java 113 * If set to true then the ANTLR tool will generate a description of the DFA
118 protected boolean dfa; field in class:Antlr3Mojo
144 * for the DFA.
283 log.debug("ANTLR: dfa : " + dfa);
316 tool.setGenerate_DFA_dot(dfa);
  /external/chromium_org/third_party/yasm/source/patched-yasm/tools/re2c/
actions.c 8 #include "tools/re2c/dfa.h"
645 DFA *dfa; local
688 dfa = DFA_new(ins, re->size, 0, 256, rep);
689 DFA_emit(dfa, o);
690 DFA_delete(dfa);
  /external/antlr/antlr-3.4/tool/src/main/java/org/antlr/tool/
Interpreter.java 30 import org.antlr.analysis.DFA;
140 // Create the DFA predictors for each decision
178 // Create the DFA predictors for each decision
236 DFA dfa = s.nfa.grammar.getLookaheadDFA(s.getDecisionNumber()); local
240 dfa.getNFADecisionStartState().getDescription()+
245 int predictedAlt = predict(dfa);
247 String description = dfa.getNFADecisionStartState().getDescription();
250 dfa.getDecisionNumber(),
321 // could be jumping to new grammar, make sure DFA create
    [all...]
GrammarReport.java 30 import org.antlr.analysis.DFA;
143 if( d.dfa==null ) {
147 Rule r = d.dfa.decisionNFAStartState.enclosingRule;
157 //if ( g.decisionsWhoseDFAsUsesSynPreds.contains(d.dfa) ) dfaWithSynPred++;
158 if ( d.dfa.hasSynPred() ) dfaWithSynPred++;
167 // int nalts = grammar.getNumberOfAltsForDecisionNFA(d.dfa.decisionNFAStartState);
170 // grammar.getNFAStateForAltOfDecision(d.dfa.decisionNFAStartState, a);
172 if ( !d.dfa.isCyclic() ) {
173 if ( d.dfa.isClassicDFA() ) {
174 int maxk = d.dfa.getMaxLookaheadDepth()
295 DFA dfa = (DFA) it.next(); local
    [all...]
  /external/antlr/antlr-3.4/tool/src/main/java/org/antlr/codegen/
CodeGenerator.java 32 import org.antlr.analysis.DFA;
66 * to have a separate file for the cyclic DFA as ANTLR generates bytecodes
288 // CREATE NFA FROM GRAMMAR, CREATE DFA FROM NFA
295 // some grammar analysis errors will not yield reliable DFA
300 // OPTIMIZE DFA
624 /** Generate code that computes the predicted alt given a DFA. The
632 DFA dfa)
635 // If we are doing inline DFA and this one is acyclic and LL(*)
637 // check is not done by DFA.verify(); that is, verify() avoid
745 DFA dfa = ((DFAState)edge.target).dfa; \/\/ which DFA are we in local
    [all...]
  /external/antlr/antlr-3.4/antlr-ant/main/antlr3-task/antlr3-src/org/apache/tools/ant/antlr/
ANTLR3.java 104 /** The dfa attribute */
105 private boolean dfa; field in class:ANTLR3
108 /** collapse incident edges into DFA states */
215 this.dfa = enable;
227 * collapse incident edges into DFA states
525 if (dfa) {
526 commandline.createArgument().setValue("-dfa");
  /external/antlr/antlr-3.4/antlr-ant/main/antlr3-task/
antlr3.jar 
  /external/antlr/antlr-3.4/tool/src/main/java/org/antlr/
Tool.java 204 else if (args[i].equals("-dfa")) {
278 System.err.println("missing max inline dfa states -Xmaxinlinedfastates option; ignoring");
318 DFA.MAX_STATE_TRANSITIONS_FOR_TABLE = Integer.parseInt(args[i]);
327 DFA.MAX_TIME_PER_DFA_CREATION = Integer.parseInt(args[i]);
633 /** Create NFA, DFA and generate code for grammar.
635 * it's ok to create DFA, which must check for left-recursion. That check
637 * After all NFA, comes DFA conversion for root grammar then code gen for
638 * root grammar. DFA and code gen for delegates comes next.
673 DFA dfa = g.getLookaheadDFA(d) local
    [all...]
  /external/chromium_org/third_party/re2/re2/
dfa.cc 5 // A DFA (deterministic finite automaton)-based regular expression search.
7 // The DFA search has two main parts: the construction of the automaton,
20 // the definition of class DFA.
33 "Whether the RE2 DFA should bail out early "
49 // Changing this to true compiles in prints that trace execution of the DFA.
53 // A DFA implementation of a regular expression program.
56 // the comments in the sections that follow the DFA definition.
57 class DFA {
59 DFA(Prog* prog, Prog::MatchKind kind, int64 max_mem);
60 ~DFA();
1825 DFA *dfa = ANNOTATE_UNPROTECTED_READ(*pdfa); local
1911 DFA* dfa = GetDFA(kind); local
2120 DFA* dfa = NULL; local
    [all...]
  /external/regex-re2/re2/
dfa.cc 5 // A DFA (deterministic finite automaton)-based regular expression search.
7 // The DFA search has two main parts: the construction of the automaton,
20 // the definition of class DFA.
31 "Whether the RE2 DFA should bail out early "
47 // Changing this to true compiles in prints that trace execution of the DFA.
51 // A DFA implementation of a regular expression program.
54 // the comments in the sections that follow the DFA definition.
55 class DFA {
57 DFA(Prog* prog, Prog::MatchKind kind, int64 max_mem);
58 ~DFA();
1823 DFA *dfa = ANNOTATE_UNPROTECTED_READ(*pdfa); local
1909 DFA* dfa = GetDFA(kind); local
2118 DFA* dfa = NULL; local
    [all...]
  /ndk/sources/host-tools/sed-4.2.1/lib/
regcomp.c 28 static reg_errcode_t init_dfa (re_dfa_t *dfa, size_t pat_len);
33 static reg_errcode_t create_initial_state (re_dfa_t *dfa);
35 static void optimize_utf8 (re_dfa_t *dfa);
51 static Idx duplicate_node (re_dfa_t *dfa, Idx org_idx, unsigned int constraint);
52 static Idx search_duplicated_node (const re_dfa_t *dfa, Idx org_node,
54 static reg_errcode_t calc_eclosure (re_dfa_t *dfa);
55 static reg_errcode_t calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa,
57 static reg_errcode_t calc_inveclosure (re_dfa_t *dfa);
77 re_dfa_t *dfa, re_token_t *token,
79 static bin_tree_t *parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa,
279 re_dfa_t *dfa = (re_dfa_t *) bufp->buffer; local
313 re_dfa_t *dfa = (re_dfa_t *) bufp->buffer; local
663 re_dfa_t *dfa = (re_dfa_t *) preg->buffer; local
757 re_dfa_t *dfa; local
961 re_dfa_t *dfa = (re_dfa_t *) preg->buffer; local
1142 re_dfa_t *dfa = (re_dfa_t *) preg->buffer; local
1270 re_dfa_t *dfa = (re_dfa_t *) extra; local
1323 re_dfa_t *dfa = (re_dfa_t *) preg->buffer; local
1360 re_dfa_t *dfa = (re_dfa_t *) extra; local
1405 re_dfa_t *dfa = (re_dfa_t *) extra; local
2104 re_dfa_t *dfa = (re_dfa_t *) preg->buffer; local
2138 re_dfa_t *dfa = (re_dfa_t *) preg->buffer; local
2180 re_dfa_t *dfa = (re_dfa_t *) preg->buffer; local
2219 re_dfa_t *dfa = (re_dfa_t *) preg->buffer; local
2435 re_dfa_t *dfa = (re_dfa_t *) preg->buffer; local
    [all...]
regex_internal.h 494 /* `node_idx' is the index in dfa->nodes, if `type' == 0.
613 const re_dfa_t *const dfa; member in struct:__anon35086
615 const re_dfa_t *dfa; member in struct:__anon35086
682 Idx nbackref; /* The number of backreference in this dfa. */
689 /* If this dfa has "multibyte node", which is a backreference or
regexec.c 67 static void update_regs (const re_dfa_t *dfa, regmatch_t *pmatch,
100 static reg_errcode_t add_epsilon_src_nodes (const re_dfa_t *dfa,
116 static reg_errcode_t check_subexp_limits (const re_dfa_t *dfa,
126 static reg_errcode_t merge_state_array (const re_dfa_t *dfa,
164 static Idx find_subexp_node (const re_dfa_t *dfa, const re_node_set *nodes,
175 static reg_errcode_t check_arrival_expand_ecl (const re_dfa_t *dfa,
179 static reg_errcode_t check_arrival_expand_ecl_sub (const re_dfa_t *dfa,
187 static bool build_trtable (const re_dfa_t *dfa,
190 static int check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx,
199 static Idx group_nodes_into_DFAstates (const re_dfa_t *dfa,
236 re_dfa_t *dfa = (re_dfa_t *) preg->buffer; local
431 re_dfa_t *dfa = (re_dfa_t *) bufp->buffer; local
650 const re_dfa_t *dfa = (const re_dfa_t *) preg->buffer; local
980 const re_dfa_t *const dfa = mctx->dfa; local
1077 const re_dfa_t *const dfa = mctx->dfa; local
1119 const re_dfa_t *const dfa = mctx->dfa; local
1293 const re_dfa_t *const dfa = mctx->dfa; local
1441 const re_dfa_t *dfa = (const re_dfa_t *) preg->buffer; local
1695 const re_dfa_t *const dfa = mctx->dfa; local
1810 const re_dfa_t *const dfa = mctx->dfa; local
1931 const re_dfa_t *const dfa = mctx->dfa; local
1967 const re_dfa_t *const dfa = mctx->dfa; local
2167 const re_dfa_t *const dfa = mctx->dfa; local
2267 const re_dfa_t *const dfa = mctx->dfa; local
2355 const re_dfa_t *const dfa = mctx->dfa; local
2465 const re_dfa_t *const dfa = mctx->dfa; local
2537 const re_dfa_t *const dfa = mctx->dfa; local
2608 const re_dfa_t *const dfa = mctx->dfa; local
2722 const re_dfa_t *const dfa = mctx->dfa; local
2924 const re_dfa_t *const dfa = mctx->dfa; local
3086 const re_dfa_t *const dfa = mctx->dfa; local
3265 const re_dfa_t *const dfa = mctx->dfa; local
    [all...]

Completed in 351 milliseconds

1 2