/external/antlr/antlr-3.4/runtime/ObjC/Framework/examples/hoistedPredicates/ |
H A D | T.g | 2 * which they are found and used in other decisions. This grammar illustrates 9 grammar T;
|
/external/antlr/antlr-3.4/runtime/Ruby/test/functional/ast-output/ |
H A D | 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 [all...] |
H A D | auto-ast.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 [all...] |
H A D | hetero-nodes.rb | 10 grammar VToken; 29 grammar TokenWithQualifiedType; 48 grammar TokenWithLabel; 67 grammar TokenWithListLabel; 86 grammar TokenRoot; 106 grammar TokenRootWithListLabel; 126 grammar FromString; 146 grammar StringRoot; 166 grammar RewriteToken; 186 grammar RewriteTokenWithArg [all...] |
/external/antlr/antlr-3.4/tool/src/main/java/org/antlr/tool/ |
H A D | 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); 111 generator.getRecognizerFileName(grammar [all...] |
H A D | GrammarSyntaxMessage.java | 34 /** A problem with the syntax of your antlr grammar such as 44 Grammar grammar, 48 this(msgID,grammar,offendingToken,null,exception); 52 Grammar grammar, 60 this.g = grammar; 71 // TODO: have to update all v2 grammar files for this. or use errormanager and tool to get the current grammar 43 GrammarSyntaxMessage(int msgID, Grammar grammar, Token offendingToken, RecognitionException exception) argument 51 GrammarSyntaxMessage(int msgID, Grammar grammar, Token offendingToken, Object arg, RecognitionException exception) argument
|
H A D | Rule.java | 32 import org.antlr.grammar.v3.ANTLRParser; 60 /** To which grammar does this belong? */ 61 public Grammar grammar; field in class:Rule 85 /** A list of all LabelElementPair attached to tokens like x=. in tree grammar */ 88 /** A list of all LabelElementPair attached to tokens like x+=. in tree grammar */ 160 public Rule(Grammar grammar, argument 168 this.grammar = grammar; 185 Grammar.LabelElementPair pair = grammar.new LabelElementPair(label,elementRef); 314 String output = (String)grammar [all...] |
/external/antlr/antlr-3.4/tool/src/main/resources/org/antlr/codegen/templates/ObjC/ |
H A D | 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 [all...] |
H A D | ASTDbg.stg | 39 <if(grammar.grammarIsRoot)> 44 <grammar.directDelegates:{g|[<g:delegateName()> setTreeAdaptor:adaptor];}> 85 <if(grammar.grammarIsRoot)> <! don't create new adaptor for delegates !>
|
/external/antlr/antlr-3.4/runtime/Ruby/test/functional/delegation/ |
H A D | import.rb | 8 def load( grammar ) 9 grammar.compile 10 $:.unshift( grammar.output_directory ) unless $:.include?( grammar.output_directory ) 11 for file in grammar.target_files( false ) 18 parser grammar DIDRSlave; 28 grammar DIDRMaster; 48 parser grammar Slave2; 60 grammar Master2; 79 parser grammar Slave [all...] |
/external/antlr/antlr-3.4/runtime/Ruby/test/functional/lexer/ |
H A D | syn-pred.rb | 8 lexer grammar SyntacticPredicateGate;
|
H A D | nuances.rb | 8 lexer grammar Bug80; 32 lexer grammar EndOfFile;
|
/external/antlr/antlr-3.4/runtime/Perl5/t/lib/ANTLR/Runtime/ |
H A D | Test.pm | 52 my $grammar = $args->{grammar}; 61 if ($grammar =~ /^(?:(?:lexer|parser|tree)\s+)? grammar \s+ (\w+)/xms) { 64 croak "Can't determine grammar name"; 67 # write grammar file 69 write_file($grammar_file, $grammar); 78 # compile grammar
|
/external/antlr/antlr-3.4/tool/src/main/java/org/antlr/codegen/ |
H A D | CodeGenerator.java | 34 import org.antlr.grammar.v3.ANTLRLexer; 35 import org.antlr.grammar.v3.ANTLRParser; 36 import org.antlr.grammar.v3.ActionTranslator; 37 import org.antlr.grammar.v3.CodeGenTreeWalker; 63 * in a grammar file dictates which templates get loaded/used. 91 /** Which grammar are we generating code for? Each generator 92 * is attached to a specific grammar. 94 public Grammar grammar; field in class:CodeGenerator 153 public CodeGenerator(Tool tool, Grammar grammar, String language) { argument 155 this.grammar [all...] |
H A D | CTarget.java | 44 Grammar grammar, 52 String fileName = generator.getRecognizerFileName(grammar.name, grammar.type); 59 Grammar grammar, 67 String fileName = generator.getRecognizerFileName(grammar.name, grammar.type); 75 Grammar grammar, 81 /** Is scope in @scope::name {action} valid for this kind of grammar? 183 /** Convert from an ANTLR string literal found in a grammar file to 276 * Overrides the standard grammar analysi 42 genRecognizerFile(Tool tool, CodeGenerator generator, Grammar grammar, ST outputFileST) argument 57 genRecognizerHeaderFile(Tool tool, CodeGenerator generator, Grammar grammar, ST headerFileST, String extName) argument 73 chooseWhereCyclicDFAsGo(Tool tool, CodeGenerator generator, Grammar grammar, ST recognizerST, ST cyclicDFAST) argument 291 performGrammarAnalysis(CodeGenerator generator, Grammar grammar) argument [all...] |
H A D | CSharp3Target.java | 82 protected void genRecognizerFile(Tool tool, CodeGenerator generator, Grammar grammar, ST outputFileST) throws IOException argument 84 if (!grammar.getGrammarIsRoot()) 86 Grammar rootGrammar = grammar.composite.getRootGrammar(); 87 String actionScope = grammar.getDefaultActionScope(grammar.type); 92 actions = grammar.getActions().get(actionScope); 96 grammar.getActions().put(actionScope, actions); 104 super.genRecognizerFile(tool, generator, grammar, outputFileST);
|
H A D | PythonTarget.java | 54 String name = generator.grammar.getTokenDisplayName(ttype);
|
/external/antlr/antlr-3.4/tool/src/main/resources/org/antlr/codegen/templates/Python/ |
H A D | Dbg.stg | 63 <if(grammar.grammarIsRoot)> 65 "invalidRule", <grammar.allImportedRules:{rST | "<rST.name>"}; wrap="\n ", separator=", "> 70 <grammar.decisions:{d | <if(d.dfa.hasSynPred)>True<else>False<endif>}; wrap="\n ", separator=", "> 72 <if(grammar.grammarIsRoot)> <! grammar imports other grammar(s) !> 88 <else> <! imported grammar !> 90 return <grammar.delegators:{g| <g:delegateName()>}>.getRuleLevel() 93 <grammar.delegators:{g| <g:delegateName()>}>.incRuleLevel() 96 <grammar [all...] |
H A D | ASTDbg.stg | 36 <if(grammar.grammarIsRoot)> 41 <grammar.directDelegates:{g|<g:delegateName()>.setTreeAdaptor(self._adaptor)}>
|
/external/antlr/antlr-3.4/tool/src/main/antlr3/org/antlr/grammar/v3/ |
H A D | CodeGenTreeWalker.g | 33 /** Walk a grammar and generate code by gradually building up 40 tree grammar CodeGenTreeWalker; 48 package org.antlr.grammar.v3; 104 grammar, 115 protected Grammar grammar; 130 if (grammar.type == Grammar.LEXER) { 141 Rule r = grammar.getRule( currentRuleName ); 148 if ( ( grammar.buildAST() || suffix.length() > 0 ) && label == null && 153 grammar.defineRuleRefLabel( currentRuleName, labelTok, elementAST ); 184 Rule r = grammar [all...] |
/external/antlr/antlr-3.4/runtime/Ruby/test/functional/main/ |
H A D | main-scripts.rb | 13 grammar = inline_grammar( <<-'END' ) 14 lexer grammar MainOverride; 25 # when this grammar is compiled and the resulting ruby files 28 proc { compile_and_load( grammar ) }.should_not raise_error 32 lexer_script = grammar.target_files.first 42 lexer grammar LexerMainWithSourceFile; 66 lexer grammar LexerMainFromStdIO; 78 example 'using Parser.main to run the built-in parser script utility with a combo grammar' do 80 grammar MainForCombined; 100 grammar ASTParserMai [all...] |
/external/antlr/antlr-3.4/tool/src/main/java/org/antlr/analysis/ |
H A D | DFAOptimizer.java | 130 protected Grammar grammar; field in class:DFAOptimizer 132 public DFAOptimizer(Grammar grammar) { argument 133 this.grammar = grammar; 137 // optimize each DFA in this grammar 139 decisionNumber<=grammar.getNumberOfDecisions(); 142 DFA dfa = grammar.getLookaheadDFA(decisionNumber); 196 edge.label.toString(d.dfa.nfa.grammar)+"->"+ 225 edge.label.toString(d.dfa.nfa.grammar)+"->"+
|
/external/antlr/antlr-3.4/runtime/Ruby/test/functional/template-output/ |
H A D | template-output.rb | 8 def parse( grammar, input, options = nil ) 9 @grammar = inline_grammar( grammar ) 10 compile_and_load( @grammar ) 11 grammar_module = self.class.const_get( @grammar.name ) 35 grammar InlineTemplates; 62 grammar ExternalTemplate; 83 grammar EmptyTemplate; 102 grammar List; 123 grammar Actio [all...] |
/external/antlr/antlr-3.4/runtime/CSharp3/Sources/Antlr3.Runtime.Test/ |
H A D | FastSimpleExpression.g3 | 33 grammar FastSimpleExpression;
|
/external/antlr/antlr-3.4/runtime/Ruby/lib/antlr3/ |
H A D | task.rb | 14 A rake task-generating utility concerning ANTLR grammar file 163 for grammar in @grammars 165 if vocab = grammar.token_vocab and 166 tfile = find_tokens_file( vocab, grammar ) 170 grammar.define_tasks( deps ) 175 for grammar in @grammars 176 grammar.clean 183 def find_tokens_file( vocab, grammar ) 188 | unable to locate .tokens file `#{ vocab }' referenced in #{ grammar.path } 201 def compile( grammar ) [all...] |