/external/antlr/antlr-3.4/tool/src/main/java/org/antlr/analysis/ |
NFAConversionThread.java | 32 import org.antlr.tool.Grammar; 36 Grammar grammar; field in class:NFAConversionThread 39 public NFAConversionThread(Grammar grammar, 44 this.grammar = grammar; 51 NFAState decisionStartState = grammar.getDecisionNFAStartState(decision); 53 grammar.createLookaheadDFA(decision,true);
|
/external/antlr/antlr-3.4/tool/src/main/java/org/antlr/codegen/ |
JavaTarget.java | 31 import org.antlr.tool.Grammar; 40 Grammar grammar, 48 protected void performGrammarAnalysis(CodeGenerator generator, Grammar grammar) { 49 super.performGrammarAnalysis(generator, grammar); 50 for (Rule rule : grammar.getRules()) { 53 Set<Rule> delegatedRules = grammar.getDelegatedRules();
|
ObjCTarget.java | 34 import org.antlr.tool.Grammar; 41 Grammar grammar, 46 generator.write(headerFileST, grammar.name + Grammar.grammarTypeToFileNameSuffix[grammar.type] + extName); 64 /** Convert from an ANTLR string literal found in a grammar file to 83 String name = generator.grammar.getTokenDisplayName(ttype); 89 //return generator.grammar.name + Grammar.grammarTypeToFileNameSuffix[generator.grammar.type] + "_" + name [all...] |
/external/antlr/antlr-3.4/runtime/Ruby/lib/antlr3/test/ |
functional.rb | 6 require 'antlr3/test/grammar' 49 def import_grammar_targets( grammar ) 50 for file in grammar.target_files 70 Grammar.global_dependency( ANTLR_JAR ) 98 # An index of grammar file objects created in the test class 112 grammar = Grammar.new( path, :output_directory => output_directory ) 113 register_grammar( grammar ) 114 return grammar 119 grammar = Grammar.inline source [all...] |
/external/antlr/antlr-3.4/runtime/Python/tests/ |
t053hetero.py | 63 def execParser(self, grammar, grammarEntry, input): 64 lexerCls, parserCls = self.compileInlineGrammar(grammar) 78 def execTreeParser(self, grammar, grammarEntry, treeGrammar, treeEntry, input): 79 lexerCls, parserCls = self.compileInlineGrammar(grammar) 101 grammar = textwrap.dedent( 103 grammar T1; 121 grammar, 'a', 129 grammar = textwrap.dedent( 131 grammar T; 142 grammar, 'a' [all...] |
t049treeparser.py | 35 def execTreeParser(self, grammar, grammarEntry, treeGrammar, treeEntry, input): 36 lexerCls, parserCls = self.compileInlineGrammar(grammar) 53 grammar = textwrap.dedent( 54 r'''grammar T; 66 r'''tree grammar TP; 77 grammar, 'a', 87 grammar = textwrap.dedent( 88 r'''grammar T; 100 r'''tree grammar TP; 111 grammar, 'a' [all...] |
t055templates.py | 12 def execParser(self, grammar, grammarEntry, input, group=None): 13 lexerCls, parserCls = self.compileInlineGrammar(grammar) 28 grammar = textwrap.dedent( 29 r'''grammar T; 46 grammar, 'a', 68 grammar = textwrap.dedent( 69 r'''grammar T2; 86 grammar, 'a', 95 grammar = textwrap.dedent( 96 r'''grammar T [all...] |
t056lexer.py | 14 def execParser(self, grammar, grammarEntry, input): 15 lexerCls, parserCls = self.compileInlineGrammar(grammar) 28 grammar = textwrap.dedent( 30 grammar P; 41 grammar, 'a',
|
t059debug.py | 49 assert l.startswith('grammar "') 74 def execParser(self, grammar, grammarEntry, input, listener, 87 grammar, options='-debug') 101 grammar = textwrap.dedent( 103 grammar T; 115 grammar, 'a', 138 grammar = textwrap.dedent( 140 grammar T; 150 grammar, 'a', 173 grammar = textwrap.dedent [all...] |
/external/antlr/antlr-3.4/tool/src/main/java/org/antlr/tool/ |
NameSpaceChecker.java | 38 protected Grammar grammar; field in class:NameSpaceChecker 40 public NameSpaceChecker(Grammar grammar) { 41 this.grammar = grammar; 45 for (int i = CompositeGrammar.MIN_RULE_INDEX; i < grammar.composite.ruleIndexToRuleList.size(); i++) { 46 Rule r = grammar.composite.ruleIndexToRuleList.elementAt(i); 54 Grammar.LabelElementPair pair = (Grammar.LabelElementPair) it.next() [all...] |
CompositeGrammarTree.java | 36 public Grammar grammar; field in class:CompositeGrammarTree 41 public CompositeGrammarTree(Grammar g) { 42 grammar = g; 57 /** Find a rule by looking in current grammar then down towards the 61 Rule r = grammar.getLocallyDefinedRule(ruleName); 69 /** Find an option by looking up towards the root grammar rather than down */ 71 if ( grammar.tool!=null && key!=null && key.equals("language") && 72 grammar.tool.forcedLanguageOption!=null ) { 73 return grammar.tool.forcedLanguageOption [all...] |
AssignTokenTypesBehavior.java | 31 import org.antlr.grammar.v3.AssignTokenTypesWalker; 37 /** Move all of the functionality from assign.types.g grammar file. */ 57 protected void init(Grammar g) { 58 this.grammar = g; 70 if ( currentRuleName==null && grammar.type==Grammar.LEXER ) { 72 grammar, 77 // in a plain parser grammar rule, cannot reference literals 79 // don't warn until we hit root grammar as may be defined there. 80 if ( grammar.getGrammarIsRoot() & [all...] |
GrammarSanity.java | 33 import org.antlr.grammar.v3.ANTLRParser; 48 protected Grammar grammar; field in class:GrammarSanity 49 public GrammarSanity(Grammar grammar) { 50 this.grammar = grammar; 59 grammar.buildNFA(); // make sure we have NFAs 60 grammar.leftRecursiveRules = new HashSet(); 62 for (int i = 0; i < grammar.composite.ruleIndexToRuleList.size(); i++) [all...] |
/external/antlr/antlr-3.4/tool/src/main/resources/org/antlr/codegen/templates/CSharp2/ |
Dbg.stg | 44 <if(grammar.grammarIsRoot)> 48 "invalidRule", <grammar.allImportedRules:{rST | "<rST.name>"}; wrap="\n ", separator=", "> 51 <if(grammar.grammarIsRoot)><! grammar imports other grammar(s) !> 62 <else><! imported grammar !> 63 public int RuleLevel { get { return <grammar.delegators:{g| <g:delegateName()>}>.RuleLevel; } } 64 public void IncRuleLevel() { <grammar.delegators:{g| <g:delegateName()>}>.IncRuleLevel(); } 65 public void DecRuleLevel() { <grammar.delegators:{g| <g:delegateName()>}>.DecRuleLevel(); } 72 ((Profiler)dbg).ExamineRuleMemoization(input, ruleIndex, stopIndex, <grammar.composite.rootGrammar.recognizerName>.ruleNames[ruleIndex]) [all...] |
/external/antlr/antlr-3.4/tool/src/main/resources/org/antlr/codegen/templates/CSharp3/ |
Dbg.stg | 43 <if(grammar.grammarIsRoot)> 47 "invalidRule", <grammar.allImportedRules:{rST | "<rST.name>"}; wrap="\n ", separator=", "> 50 <if(grammar.grammarIsRoot)><! grammar imports other grammar(s) !> 61 <else><! imported grammar !> 62 public int RuleLevel { get { return <grammar.delegators:{g| <g:delegateName()>}>.RuleLevel; } } 63 public void IncRuleLevel() { <grammar.delegators:{g| <g:delegateName()>}>.IncRuleLevel(); } 64 public void DecRuleLevel() { <grammar.delegators:{g| <g:delegateName()>}>.DecRuleLevel(); } 71 ((Profiler)dbg).ExamineRuleMemoization(input, ruleIndex, stopIndex, <grammar.composite.rootGrammar.recognizerName>.ruleNames[ruleIndex]) [all...] |
/external/chromium_org/third_party/WebKit/public/web/ |
WebSpeechGrammar.h | 42 WebSpeechGrammar(const WebSpeechGrammar& grammar) { assign(grammar); }
|
/external/srec/tools/make_g2g/ |
make_g2g.c | 42 LFPRINTF(stdout,"usage: %s -base <base grammar filename> [-out <output file>] \n",exename); 47 SR_Grammar* grammar = NULL; local 107 /* get rid of the ',addWords=2000' grammar load param */ 113 LFPRINTF(stdout,"Loading grammar %s from text files...\n",base); 114 CHKLOG(rc, SR_GrammarLoad(base, &grammar)); 116 LFPRINTF(stdout,"Saving grammar as binary image %s...\n",outFilename); 117 CHKLOG(rc, SR_GrammarSave(grammar, outFilename)); 123 if (grammar) 124 grammar->destroy(grammar); [all...] |
/external/antlr/antlr-3.4/runtime/Ruby/test/functional/ast-output/ |
tree-rewrite.rb | 9 grammar FlatList; 21 tree grammar FlatListWalker; 33 grammar SimpleTree; 45 tree grammar SimpleTreeWalker; 56 grammar CombinedRewriteAndAuto; 68 tree grammar CombinedRewriteAndAutoTree; 79 grammar AvoidDup; 91 tree grammar AvoidDupWalker; 102 grammar Loop; 114 tree grammar LoopWalker [all...] |
/external/antlr/antlr-3.4/tool/src/main/antlr3/org/antlr/grammar/v3/ |
TreeToNFAConverter.g | 6 Grammar conversion to ANTLR v3: 33 /** Build an NFA from a tree representing an ANTLR grammar. */ 34 tree grammar TreeToNFAConverter; 42 package org.antlr.grammar.v3; 59 /** Which grammar are we converting an NFA for? */ 60 protected Grammar grammar = null; 69 public TreeToNFAConverter(TreeNodeStream input, Grammar g, NFA nfa, NFAFactory factory) { 71 this.grammar = g; 77 TreeToNFAConverter other = new TreeToNFAConverter( new CommonTreeNodeStream( t ), grammar, nfa, factory ) [all...] |
ActionAnalysis.g | 36 lexer grammar ActionAnalysis; 42 package org.antlr.grammar.v3; 49 Grammar grammar; 53 public ActionAnalysis(Grammar grammar, String ruleName, GrammarAST actionAST) 56 this.grammar = grammar; 57 this.enclosingRule = grammar.getLocallyDefinedRule(ruleName); 85 Grammar.LabelElementPair pair = enclosingRule.getRuleLabel($x.text) [all...] |
DefineGrammarItemsWalker.g | 6 Grammar conversion to ANTLR v3: 32 tree grammar DefineGrammarItemsWalker; 44 package org.antlr.grammar.v3; 51 protected Grammar grammar; 75 if ( grammar.type != Grammar.COMBINED ) { 78 // form is (header ... ) ( grammar ID (scope ...) ... ( rule ... ) ( rule ... ) ... ) 80 // find the grammar spec 81 while ( !p.getText().equals( "grammar" ) ) { [all...] |
/external/antlr/antlr-3.4/tool/src/main/resources/org/antlr/codegen/templates/C/ |
Dbg.stg | 35 <if(grammar.grammarIsRoot)> 39 "invalidRule", <grammar.allImportedRules:{rST | "<rST.name>"}; wrap="\n ", separator=", "> 42 <if(grammar.grammarIsRoot)> <! grammar imports other grammar(s) !> 56 <else> <! imported grammar !> 60 return <grammar.delegators:{g| <g:delegateName()>}>->getRuleLevel(); 64 <grammar.delegators:{g| <g:delegateName()>}>->incRuleLevel(); 69 <grammar.delegators:{g| <g:delegateName()>}>.decRuleLevel(); 76 <if(grammar.grammarIsRoot) [all...] |
/external/antlr/antlr-3.4/tool/src/main/resources/org/antlr/codegen/templates/Java/ |
Dbg.stg | 38 <if(grammar.grammarIsRoot)> 40 "invalidRule", <grammar.allImportedRules:{rST | "<rST.name>"}; wrap="\n ", separator=", "> 45 <grammar.decisions:{d | <d.dfa.hasSynPred; null="false">}; wrap="\n ", separator=", "> 47 <if(grammar.grammarIsRoot)> <! grammar imports other grammar(s) !> 58 <else> <! imported grammar !> 59 public int getRuleLevel() { return <grammar.delegators:{g| <g:delegateName()>}>.getRuleLevel(); } 60 public void incRuleLevel() { <grammar.delegators:{g| <g:delegateName()>}>.incRuleLevel(); } 61 public void decRuleLevel() { <grammar.delegators:{g| <g:delegateName()>}>.decRuleLevel(); [all...] |
/prebuilts/python/darwin-x86/2.7.5/lib/python2.7/lib2to3/pgen2/ |
parse.py | 4 """Parser engine for the grammar tables generated by pgen. 6 The grammar table must be loaded first. 32 p = Parser(grammar, [converter]) # create instance 57 def __init__(self, grammar, convert=None): 60 The grammar argument is a grammar.Grammar instance; see the 61 grammar module for more information. 70 two arguments, the first being the grammar (a grammar.Gramma [all...] |
/prebuilts/python/linux-x86/2.7.5/lib/python2.7/lib2to3/pgen2/ |
parse.py | 4 """Parser engine for the grammar tables generated by pgen. 6 The grammar table must be loaded first. 32 p = Parser(grammar, [converter]) # create instance 57 def __init__(self, grammar, convert=None): 60 The grammar argument is a grammar.Grammar instance; see the 61 grammar module for more information. 70 two arguments, the first being the grammar (a grammar.Gramma [all...] |