/external/antlr/antlr-3.4/tool/src/main/java/org/antlr/codegen/ |
ActionScriptTarget.java | 32 import org.antlr.tool.Grammar; 40 int c = Grammar.getCharValueFromGrammarCharLiteral(literal); 52 String name = generator.grammar.getTokenDisplayName(ttype); 128 Grammar grammar,
|
CSharp3Target.java | 36 import org.antlr.tool.Grammar; 82 protected void genRecognizerFile(Tool tool, CodeGenerator generator, Grammar grammar, ST outputFileST) throws IOException 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) [all...] |
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) [all...] |
RubyTarget.java | 32 import org.antlr.tool.Grammar; 306 Grammar grammar, 314 and then generate code from that. It keeps the combo/parser grammar object 315 and the lexer grammar object, as well as their respective code generator and 321 - if this method is called with a combo grammar, and the action map 322 in the grammar contains an entry for the named scope "all", 323 add an entry to sharedActionBlocks mapping the grammar name to 326 (one that's extracted from a combo grammar), check to see if 327 there's an entry in sharedActionBlocks for the lexer's grammar name [all...] |
/external/antlr/antlr-3.4/tool/src/main/java/org/antlr/tool/ |
GrammarSerializerFoo.java | 36 /** Serialize a grammar into a highly compressed form with 48 protected Grammar g; 54 public GrammarSerializerFoo(Grammar g) { 75 public void grammar(int grammarTokenType, String name) { method in class:GrammarSerializerFoo 174 if ( g.type!=Grammar.LEXER ) {
|
Grammar.java | 35 import org.antlr.grammar.v3.*; 47 /** Represents a grammar in memory. */ 48 public class Grammar { 65 public static final int WILDCARD_TREE_LABEL = 6; // Used in tree grammar x=. 66 public static final int WILDCARD_TREE_LIST_LABEL = 7; // Used in tree grammar x+=. 121 "Parser" // if combined grammar, gen Parser and Lexer will be done later 125 * another tree parser. Maps delegate to set of delegator grammar types. 146 /** This is the buffer of *all* tokens found in the grammar file 155 public Grammar grammar; field in class:Grammar.Decision [all...] |
GrammarAST.java | 32 import org.antlr.grammar.v3.ANTLRParser; 198 public String setBlockOption(Grammar grammar, String key, Object value) { 202 return setOption(blockOptions, Grammar.legalBlockOptions, grammar, key, value); 205 public String setTerminalOption(Grammar grammar, String key, Object value) { 209 return setOption(terminalOptions, Grammar.legalTokenOptions, grammar, key, value); 212 public String setOption(Map options, Set legalOptions, Grammar grammar, String key, Object value) [all...] |
GrammarReport.java | 31 import org.antlr.grammar.v3.ANTLRParser; 43 public static final String GRAMMAR_STATS_FILENAME = "grammar.stats"; 82 public Grammar grammar; field in class:GrammarReport 84 public GrammarReport(Grammar grammar) { 85 this.grammar = grammar; 88 public static ReportData getReportData(Grammar g) { 119 .startsWith(Grammar.SYNPRED_RULE_PREFIX.toUpperCase()) [all...] |
AttributeScope.java | 63 public Grammar grammar; field in class:AttributeScope 92 public AttributeScope(Grammar grammar, String name, Token derivedFromToken) { 93 this.grammar = grammar; 128 grammar, 150 grammar,
|
FASerializer.java | 57 protected Grammar grammar; field in class:FASerializer 59 /** This aspect is associated with a grammar; used to get token names */ 60 public FASerializer(Grammar grammar) { 61 this.grammar = grammar; 172 preds.genExpr(grammar.generator, 173 grammar.generator.getTemplates(), null).render() 177 buf.append("-"+edge.label.toString(grammar)+predsStr+"->") [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...] |
ErrorManager.java | 51 * issues with a grammar. 119 // GRAMMAR ERRORS 189 // GRAMMAR WARNINGS 327 /** Handle all ST error listeners here (code gen, Grammar, and this class 707 Grammar g, 719 Grammar g, 727 Grammar g, 734 Grammar g, 746 Grammar g, 754 Grammar g [all...] |
NFAFactory.java | 39 /** Routines to construct StateClusters from EBNF grammar constructs. 76 /** Optimize an alternative (list of grammar elements). 129 int tokenType = nfa.grammar.getTokenType(atomAST.getText()); 155 set = nfa.grammar.complement(set); 176 int c = Grammar.getCharValueFromGrammarCharLiteral(charLiteralAST.getText()); 186 int from = Grammar.getCharValueFromGrammarCharLiteral(a); 187 int to = Grammar.getCharValueFromGrammarCharLiteral(b); 198 if ( nfa.grammar.type==Grammar.LEXER ) { 200 Grammar.getUnescapedStringFromGrammarStringLiteral(stringLiteralAST.getText()) [all...] |
/external/antlr/antlr-3.4/tool/src/test/java/org/antlr/test/ |
TestLexer.java | 33 import org.antlr.tool.Grammar; 46 String grammar = local 47 "grammar P;\n"+ 51 String found = execParser("P.g", grammar, "PParser", "PLexer", 59 String grammar = local 60 "grammar P;\n"+ 65 String found = execParser("P.g", grammar, "PParser", "PLexer", 73 String grammar = local 74 "grammar P;\n"+ 79 String found = execParser("P.g", grammar, "PParser", "PLexer" 85 String grammar = local 100 String grammar = local 114 String grammar = local 127 String grammar = local 139 String grammar = local 151 String grammar = local 163 String grammar = local 175 String grammar = local 185 String grammar = local 196 String grammar = local 208 String grammar = local 224 String grammar = local [all...] |
TestRewriteAST.java | 33 import org.antlr.tool.Grammar; 42 String grammar = local 43 "grammar T;\n" + 49 String found = execParser("T.g", grammar, "TParser", "TLexer", 55 String grammar = local 56 "grammar T;\n" + 62 String found = execParser("T.g", grammar, "TParser", "TLexer", 68 String grammar = local 69 "grammar T;\n" + 75 String found = execParser("T.g", grammar, "TParser", "TLexer" 81 String grammar = local 95 String grammar = local 108 String grammar = local 121 String grammar = local 134 String grammar = local 148 String grammar = local 161 String grammar = local 175 String grammar = local 188 String grammar = local 202 String grammar = local 216 String grammar = local 229 String grammar = local 242 String grammar = local 255 String grammar = local 269 String grammar = local 283 String grammar = local 297 String grammar = local 310 String grammar = local 324 String grammar = local 337 String grammar = local 350 String grammar = local 366 String grammar = local 382 String grammar = local 396 String grammar = local 411 String grammar = local 425 String grammar = local 440 String grammar = local 455 String grammar = local 470 String grammar = local 485 String grammar = local 500 String grammar = local 517 String grammar = local 533 String grammar = local 553 String grammar = local 570 String grammar = local 584 String grammar = local 598 String grammar = local 613 String grammar = local 629 String grammar = local 644 String grammar = local 660 String grammar = local 676 String grammar = local 691 String grammar = local 704 String grammar = local 718 String grammar = local 732 String grammar = local 746 String grammar = local 760 String grammar = local 775 String grammar = local 789 String grammar = local 803 String grammar = local 818 String grammar = local 835 String grammar = local 849 String grammar = local 864 String grammar = local 884 String grammar = local 898 String grammar = local 912 String grammar = local 926 String grammar = local 940 String grammar = local 954 String grammar = local 968 String grammar = local 982 String grammar = local 996 String grammar = local 1009 String grammar = local 1027 String grammar = local 1040 String grammar = local 1057 String grammar = local 1076 String grammar = local 1093 String grammar = local 1110 String grammar = local 1127 String grammar = local 1144 String grammar = local 1162 String grammar = local 1190 String grammar = local 1219 String grammar = local 1247 String grammar = local 1275 String grammar = local 1303 String grammar = local 1328 String grammar = local 1344 String grammar = local 1360 String grammar = local 1376 String grammar = local 1391 String grammar = local 1407 String grammar = local 1421 String grammar = local 1440 String grammar = local [all...] |
/external/antlr/antlr-3.4/runtime/Ruby/lib/antlr3/test/ |
grammar.rb | 42 class Grammar 202 sprintf( "grammar %s (%s)", @name, @path ) 261 @source =~ /^\s*(lexer|parser|tree)?\s*grammar\s*(\S+)\s*;/ or 262 raise Grammar::FormatError[ source, path ] 266 end # class Grammar 268 class Grammar::InlineGrammar < Grammar 300 sprintf( 'inline grammar %s (%s:%s)', name, @host_file, @host_line ) 312 end # class Grammar::InlineGrammar 314 class Grammar::CompilationFailure < StandardErro [all...] |
/external/antlr/antlr-3.4/tool/src/main/java/org/antlr/ |
Tool.java | 40 /** The main ANTLR entry point. Read a grammar and generate a parser. */ 67 /** Don't process grammar file if generated files are newer than grammar */ 135 // Set all the options and pick up all the named grammar files 245 internalOption_PrintGrammarTree = true; // print grammar tree 341 // Must be the grammar file 362 * timestamp of all the grammar files involved in build the output 366 * @param grammarFileName The grammar file we are checking 396 // One of the imported grammar files has been updated so we must build 403 System.out.println("Grammar " + grammarFile + " is up to date - build skipped") 565 GrammarSpelunker grammar = new GrammarSpelunker(inputDirectory, gfile); local 600 Grammar grammar = new Grammar(this, grammarFileName, composite); local [all...] |
/external/antlr/antlr-3.4/tool/src/main/java/org/antlr/analysis/ |
Label.java | 32 import org.antlr.tool.Grammar; 298 * grammar, but the same predicate could be cut/paste into multiple 299 * places in the grammar. I must compare the text of all the 334 public String toString(Grammar g) {
|
MachineProbe.java | 34 import org.antlr.tool.Grammar; 101 public String getInputSequenceDisplay(Grammar g, List<IntSet> labels) { 110 * tokens (from grammar) associated with path through NFA following the
|
/external/antlr/antlr-3.4/tool/src/main/antlr3/org/antlr/grammar/v3/ |
ActionTranslator.g | 28 lexer grammar ActionTranslator; 35 package org.antlr.grammar.v3; 44 import org.antlr.grammar.v3.ANTLRParser; 52 Grammar grammar; 62 this.grammar = generator.grammar; 63 this.enclosingRule = grammar.getLocallyDefinedRule(ruleName); 75 grammar = generator.grammar; [all...] |
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/pgen2/ |
grammar.py | 4 """This module defines the data structures used to represent a grammar.
22 class Grammar(object):
25 Once initialized, this class supplies the grammar tables for the
33 file is written by calling dump() (after loading the grammar
58 begin this grammar rule (represented by a dict
68 start -- the number of the grammar's start symbol.
88 """Dump the grammar tables to a pickle file."""
94 """Load the grammar tables from a pickle file."""
102 Copy the grammar.
114 """Dump the grammar tables to standard output, for debugging.""" [all...] |
/prebuilts/gdb/darwin-x86/lib/python2.7/lib2to3/pgen2/ |
grammar.py | 4 """This module defines the data structures used to represent a grammar. 22 class Grammar(object): 25 Once initialized, this class supplies the grammar tables for the 33 file is written by calling dump() (after loading the grammar 58 begin this grammar rule (represented by a dict 68 start -- the number of the grammar's start symbol. 88 """Dump the grammar tables to a pickle file.""" 94 """Load the grammar tables from a pickle file.""" 102 Copy the grammar. 114 """Dump the grammar tables to standard output, for debugging."" [all...] |
/prebuilts/gdb/linux-x86/lib/python2.7/lib2to3/pgen2/ |
grammar.py | 4 """This module defines the data structures used to represent a grammar. 22 class Grammar(object): 25 Once initialized, this class supplies the grammar tables for the 33 file is written by calling dump() (after loading the grammar 58 begin this grammar rule (represented by a dict 68 start -- the number of the grammar's start symbol. 88 """Dump the grammar tables to a pickle file.""" 94 """Load the grammar tables from a pickle file.""" 102 Copy the grammar. 114 """Dump the grammar tables to standard output, for debugging."" [all...] |
/prebuilts/python/darwin-x86/2.7.5/lib/python2.7/lib2to3/pgen2/ |
grammar.py | 4 """This module defines the data structures used to represent a grammar. 22 class Grammar(object): 25 Once initialized, this class supplies the grammar tables for the 33 file is written by calling dump() (after loading the grammar 58 begin this grammar rule (represented by a dict 68 start -- the number of the grammar's start symbol. 88 """Dump the grammar tables to a pickle file.""" 94 """Load the grammar tables from a pickle file.""" 102 Copy the grammar. 114 """Dump the grammar tables to standard output, for debugging."" [all...] |
/prebuilts/python/linux-x86/2.7.5/lib/python2.7/lib2to3/pgen2/ |
grammar.py | 4 """This module defines the data structures used to represent a grammar. 22 class Grammar(object): 25 Once initialized, this class supplies the grammar tables for the 33 file is written by calling dump() (after loading the grammar 58 begin this grammar rule (represented by a dict 68 start -- the number of the grammar's start symbol. 88 """Dump the grammar tables to a pickle file.""" 94 """Load the grammar tables from a pickle file.""" 102 Copy the grammar. 114 """Dump the grammar tables to standard output, for debugging."" [all...] |