HomeSort by relevance Sort by last modified time
    Searched refs:grammar (Results 26 - 50 of 262) sorted by null

12 3 4 5 6 7 8 91011

  /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...]
ASTDbg.stg 46 <if(grammar.grammarIsRoot)>
51 <grammar.directDelegates:{g|<g:delegateName()>.TreeAdaptor = this.adaptor;}>
88 <if(grammar.grammarIsRoot)><! don't create new adaptor for delegates !>
  /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...]
ASTDbg.stg 50 <if(grammar.grammarIsRoot)>
55 <grammar.directDelegates:{g|<g:delegateName()>.TreeAdaptor = this.adaptor;}>
92 <if(grammar.grammarIsRoot)><! don't create new adaptor for delegates !>
  /external/antlr/antlr-3.4/runtime/Python/tests/
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/codegen/
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/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...]
rewrites.rb 8 def parse( grammar, rule, input, expect_errors = false )
9 @grammar = inline_grammar( grammar )
10 compile_and_load @grammar
11 grammar_module = self.class.const_get( @grammar.name )
32 def tree_parse( grammar, tree_grammar, rule, tree_rule, input )
33 @grammar = inline_grammar( grammar )
35 compile_and_load @grammar
38 grammar_module = self.class.const_get( @grammar.name
    [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...]
ASTDbg.stg 36 <if(grammar.grammarIsRoot)>
41 <grammar.directDelegates:{g|<g:delegateName()>.setTreeAdaptor(this.adaptor);}>
79 <if(grammar.grammarIsRoot)> <! don't create new adaptor for delegates !>
  /external/antlr/antlr-3.4/tool/src/main/java/org/antlr/tool/
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...]
Interpreter.java 43 * out of Grammar as it's related, but technically not a Grammar function.
44 * You create an interpreter for a grammar and an input stream. This object
47 * for a lexer grammar of course.
50 protected Grammar grammar; field in class:Interpreter
60 Grammar g;
61 public LexerActionGetTokenType(Grammar g) {
66 if ( !ruleName.equals(Grammar.ARTIFICIAL_TOKENS_RULENAME) ){
74 public Interpreter(Grammar grammar, IntStream input)
    [all...]
BuildDependencyGenerator.java 41 /** Given a grammar file, show the dependencies on .tokens etc...
43 * For example, combined grammar T.g (no token import) generates:
49 * For tree grammar TP with import of T.tokens:
63 * So this output shows what the grammar depends on *and* what it generates.
65 * Operate on one grammar file at a time. If given a list of .g on the
81 protected Grammar grammar; field in class:BuildDependencyGenerator
89 grammar = tool.getRootGrammar(grammarFileName);
90 String language = (String) grammar.getOption("language");
91 generator = new CodeGenerator(tool, grammar, language)
    [all...]
  /external/antlr/antlr-3.4/runtime/CSharp3/Sources/Antlr3.Runtime.Test/
SimpleExpression.g3 33 grammar SimpleExpression;
  /external/antlr/antlr-3.4/runtime/ObjC/Framework/examples/hoistedPredicates/
T.g 2 * which they are found and used in other decisions. This grammar illustrates
9 grammar T;
  /external/antlr/antlr-3.4/tool/src/main/resources/org/antlr/codegen/templates/ObjC/
Dbg.stg 46 <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 !>
65 return <grammar.delegators:{g| <g:delegateName()>}>.getRuleLevel();
70 <grammar.delegators:{g| <g:delegateName()>}>.incRuleLevel();
74 <grammar.delegators:{g| <g:delegateName()>}>.decRuleLevel();
81 [(Profiler)dbg examineRuleMemoization:input, ruleIndex, <grammar.composite.rootGrammar.recognizerName>.ruleNames objectAtIndex:ruleIndex]
    [all...]

Completed in 938 milliseconds

12 3 4 5 6 7 8 91011