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

1 2 3 4

  /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...]
  /external/antlr/antlr-3.4/runtime/Ruby/test/unit/
test-dfa.rb 8 class DFASubclass < ANTLR3::DFA
23 dfa = DFASubclass.new(nil, 1)
24 dfa.eot.should == DFASubclass::EOT
25 dfa.eof.should == DFASubclass::EOF
26 dfa.max.should == DFASubclass::MAX
27 dfa.min.should == DFASubclass::MIN
28 dfa.accept.should == DFASubclass::ACCEPT
29 dfa.special.should == DFASubclass::SPECIAL
30 dfa.transition.should == DFASubclass::TRANSITION
49 ANTLR3::DFA.unpack(*packed).should == unpacke
    [all...]
  /external/clang/test/CodeGen/
2009-05-22-callingconv.c 8 int icase, const re_dfa_t *dfa)
11 re_string_construct (pstr, str, len, trans, icase, dfa)
16 const re_dfa_t *dfa;
18 if (dfa != (void*)0x282020c0)
  /external/antlr/antlr-3.4/tool/src/main/java/org/antlr/tool/
GrammarReport2.java 60 if ( d.dfa==null ) { // unusued decisions in auto synpreds
61 //System.err.println("no decision "+decision+" dfa for "+d.blockAST.toStringTree());
64 int k = d.dfa.getMaxLookaheadDepth();
65 Rule enclosingRule = d.dfa.decisionNFAStartState.enclosingRule;
70 d.dfa.decisionNFAStartState.associatedASTNode;
76 if ( d.dfa.isCyclic() ) buf.append(" cyclic");
78 if ( d.dfa.hasSynPred() ) buf.append(" backtracks"); // isolated synpred not gated
79 if ( d.dfa.hasSemPred() ) buf.append(" sempred"); // user-defined sempred
83 // String result = serializer.serialize(d.dfa.startState);
GrammarUnreachableAltsMessage.java 50 if ( probe.dfa.isTokensRuleDecision() ) {
56 GrammarAST decisionASTNode = probe.dfa.getDecisionASTNode();
59 String fileName = probe.dfa.nfa.grammar.getFileName();
66 if ( probe.dfa.isTokensRuleDecision() ) {
74 probe.dfa.nfa.grammar.getRuleStartState(tokenName);
GrammarAnalysisAbortedMessage.java 45 GrammarAST decisionASTNode = probe.dfa.getDecisionASTNode();
48 String fileName = probe.dfa.nfa.grammar.getFileName();
54 probe.dfa.getNFADecisionStartState().enclosingRule.name);
GrammarNonDeterminismMessage.java 54 if ( probe.dfa.isTokensRuleDecision() ) {
60 GrammarAST decisionASTNode = probe.dfa.getDecisionASTNode();
63 String fileName = probe.dfa.nfa.grammar.getFileName();
74 if ( probe.dfa.isTokensRuleDecision() ) {
82 probe.dfa.nfa.grammar.getRuleStartState(tokenName);
93 NFAState nfaStart = probe.dfa.getNFADecisionStartState();
112 if ( probe.dfa.isTokensRuleDecision() ) {
124 st.add("hasPredicateBlockedByAction", problemState.dfa.hasPredicateBlockedByAction);
GrammarInsufficientPredicatesMessage.java 54 GrammarAST decisionASTNode = probe.dfa.getDecisionASTNode();
57 String fileName = probe.dfa.nfa.grammar.getFileName();
80 List<Label> sampleInputLabels = problemState.dfa.probe.getSampleNonDeterministicInputSequence(problemState);
81 String input = problemState.dfa.probe.getInputSequenceDisplay(sampleInputLabels);
84 st.add("hasPredicateBlockedByAction", problemState.dfa.hasPredicateBlockedByAction);
NonRegularDecisionMessage.java 50 GrammarAST decisionASTNode = probe.dfa.getDecisionASTNode();
53 String fileName = probe.dfa.nfa.grammar.getFileName();
59 String ruleName = probe.dfa.getNFADecisionStartState().enclosingRule.name;
  /external/antlr/antlr-3.4/tool/src/main/java/org/antlr/analysis/
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...]
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...]
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...]
  /external/antlr/antlr-3.4/runtime/Python/antlr3/
__init__.py 112 # DFA
148 from dfa import *
  /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:__anon62268
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:__anon62391
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);
  /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...]
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...]
regex_internal.c 26 const re_dfa_t *dfa) internal_function;
27 static re_dfastate_t *create_ci_newstate (const re_dfa_t *dfa,
30 static re_dfastate_t *create_cd_newstate (const re_dfa_t *dfa,
44 RE_TRANSLATE_TYPE trans, bool icase, const re_dfa_t *dfa)
50 if (init_len < dfa->mb_cur_max)
51 init_len = dfa->mb_cur_max;
53 re_string_construct_common (str, len, pstr, trans, icase, dfa);
59 pstr->word_char = dfa->word_char;
60 pstr->word_ops_used = dfa->word_ops_used;
62 pstr->valid_len = (pstr->mbs_allocated || dfa->mb_cur_max > 1) ? 0 : len
    [all...]
  /external/antlr/antlr-3.4/runtime/C/include/
antlr3cyclicdfa.h 1 /// Definition of a cyclic dfa structure such that it can be
3 /// runtime function that can deal with all cyclic dfa
71 ANTLR3_INT32 (*specialStateTransition) (void * ctx, pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_INT_STREAM is, struct ANTLR3_CYCLIC_DFA_struct * dfa, ANTLR3_INT32 s);
73 ANTLR3_INT32 (*specialTransition) (void * ctx, pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_INT_STREAM is, struct ANTLR3_CYCLIC_DFA_struct * dfa, ANTLR3_INT32 s);
75 ANTLR3_INT32 (*predict) (void * ctx, pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_INT_STREAM is, struct ANTLR3_CYCLIC_DFA_struct * dfa);
  /external/antlr/antlr-3.4/tool/src/main/resources/org/antlr/codegen/templates/Ruby/
Ruby.stg 236 # - - - - - - - - - - DFA definitions - - - - - - - - - - -
780 /** Same as a normal DFA state except that we don't examine
794 /** A DFA state that is actually the loopback decision of a
829 /** A DFA state where a SWITCH may be generated. The code
871 /** The code to initiate execution of a cyclic DFA; this is used
872 * in the rule to predict an alt just like the fixed DFA case.
876 alt_<decisionNumber> = @dfa<decisionNumber>.predict( @input )
884 * used except for special DFA states that cannot be encoded as
887 cyclicDFA(dfa) ::= <<
888 class DFA<dfa.decisionNumber> \< ANTLR3::DF
    [all...]
  /external/antlr/antlr-3.4/tool/src/main/java/org/antlr/codegen/
ACyclicDFACodeGenerator.java 45 DFA dfa)
47 return walkFixedDFAGeneratingStateMachine(templates, dfa, dfa.startState, 1);
52 DFA dfa,
56 //System.out.println("walk "+s.stateNumber+" in dfa for decision "+dfa.decisionNumber);
77 if ( dfa.getNFADecisionStartState().decisionStateType==NFAState.LOOPBACK ) {
80 else if ( dfa.getNFADecisionStartState().decisionStateType==NFAState.OPTIONAL_BLOCK_START )
    [all...]
  /prebuilts/python/darwin-x86/2.7.5/lib/python2.7/lib2to3/pgen2/
parse.py 104 # Each stack entry is a tuple: (dfa, state, node).
119 dfa, state, node = self.stack[-1]
120 states, first = dfa
137 dfa, state, node = self.stack[-1]
138 states, first = dfa
177 dfa, state, node = self.stack[-1]
182 self.stack[-1] = (dfa, newstate, node)
186 dfa, state, node = self.stack[-1]
188 self.stack[-1] = (dfa, newstate, node)
197 dfa, state, node = self.stack[-1
    [all...]
  /prebuilts/python/linux-x86/2.7.5/lib/python2.7/lib2to3/pgen2/
parse.py 104 # Each stack entry is a tuple: (dfa, state, node).
119 dfa, state, node = self.stack[-1]
120 states, first = dfa
137 dfa, state, node = self.stack[-1]
138 states, first = dfa
177 dfa, state, node = self.stack[-1]
182 self.stack[-1] = (dfa, newstate, node)
186 dfa, state, node = self.stack[-1]
188 self.stack[-1] = (dfa, newstate, node)
197 dfa, state, node = self.stack[-1
    [all...]
  /external/antlr/antlr-3.4/tool/src/main/resources/org/antlr/codegen/templates/CPP/
CPP.stg 151 // cyclic dfa's
152 <cyclicDFAs:{dfa | DFA<dfa.decisionNumber> dfa<dfa.decisionNumber> = new DFA<dfa.decisionNumber>(this);}; separator="\n">
153 // dfa tables..
210 <cyclicDFAs:cyclicDFA()> <! dump tables for all DFA !>
    [all...]
  /external/antlr/antlr-3.4/runtime/Python/unittests/
testdfa.py 8 """Test case for the DFA class."""
13 We need a Recognizer in order to instanciate a DFA.
24 """DFA.__init__()
30 dfa = antlr3.DFA(
43 """DFA.unpack()"""
46 antlr3.DFA.unpack(

Completed in 1079 milliseconds

1 2 3 4