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

12 3 4 5 6

  /external/antlr/antlr-3.4/tool/src/main/java/org/antlr/analysis/
PredicateLabel.java 30 import org.antlr.tool.Grammar;
34 /** A tree of semantic predicates from the grammar AST if label==SEMPRED.
82 public String toString(Grammar g) {
LL1Analyzer.java 30 import org.antlr.grammar.v3.ANTLRParser;
33 import org.antlr.tool.Grammar;
56 public Grammar grammar; field in class:LL1Analyzer
64 public LL1Analyzer(Grammar grammar) {
65 this.grammar = grammar;
86 // walk every rule in this grammar and compare FIRST set with
93 Grammar g = delegates.get(i)
    [all...]
LookaheadSet.java 32 import org.antlr.tool.Grammar;
98 public String toString(Grammar g) {
DFAOptimizer.java 31 import org.antlr.tool.Grammar;
130 protected Grammar grammar; field in class:DFAOptimizer
132 public DFAOptimizer(Grammar grammar) {
133 this.grammar = grammar;
137 // optimize each DFA in this grammar
139 decisionNumber<=grammar.getNumberOfDecisions();
142 DFA dfa = grammar.getLookaheadDFA(decisionNumber)
    [all...]
  /external/antlr/antlr-3.4/tool/src/test/java/org/antlr/test/
TestRewriteTemplates.java 39 String grammar = local
40 "grammar T;\n" +
46 String found = execParser("T.g", grammar, "TParser", "TLexer",
52 String grammar = local
53 "grammar T;\n" +
59 String found = execParser("T.g", grammar, "TParser", "TLexer",
65 String grammar = local
66 "grammar T;\n" +
72 String found = execParser("T.g", grammar, "TParser", "TLexer",
78 String grammar local
93 String grammar = local
108 String grammar = local
121 String grammar = local
136 String grammar = local
151 String grammar = local
165 String grammar = local
179 String grammar = local
197 String grammar = local
217 String grammar = local
    [all...]
TestMessages.java 32 import org.antlr.grammar.v3.ANTLRParser;
33 import org.antlr.grammar.v3.ActionTranslator;
36 import org.antlr.tool.Grammar;
51 Grammar g = new Grammar(
52 "grammar a;\n" +
TestCommonTokenStream.java 32 import org.antlr.tool.Grammar;
39 Grammar g = new Grammar(
40 "lexer grammar t;\n"+
60 Grammar g = new Grammar(
61 "lexer grammar t;\n"+
81 Grammar g = new Grammar(
82 "lexer grammar t;\n"
    [all...]
TestCompositeGrammars.java 42 String grammar = local
43 "parser grammar S;\n" +
45 Grammar g = new Grammar(grammar);
51 "parser grammar S;\n" +
56 "grammar M;\n" +
71 "parser grammar S;\n" +
76 "grammar M;\n" +
91 "parser grammar S;\n"
    [all...]
  /external/antlr/antlr-3.4/tool/src/main/java/org/antlr/codegen/
PythonTarget.java 39 import org.antlr.tool.Grammar;
54 String name = generator.grammar.getTokenDisplayName(ttype);
67 int c = Grammar.getCharValueFromGrammarCharLiteral(literal);
CPPTarget.java 33 import org.antlr.tool.Grammar;
88 Grammar grammar,
93 generator.write(headerFileST, grammar.name+extName);
96 /** Convert from an ANTLR char literal found in a grammar file to
104 int c = Grammar.getCharValueFromGrammarCharLiteral(literal);
106 if( codegen.grammar.getMaxCharValue() > 255 )
113 /** Convert from an ANTLR string literal found in a grammar file to
121 StringBuffer buf = Grammar.getUnescapedStringFromGrammarStringLiteral(literal);
123 if( codegen.grammar.getMaxCharValue() > 255
    [all...]
Perl5Target.java 32 import org.antlr.tool.Grammar;
48 final int c = Grammar.getCharValueFromGrammarCharLiteral(literal);
DelphiTarget.java 34 import org.antlr.tool.Grammar;
51 Grammar grammar,
74 int c = Grammar.getCharValueFromGrammarCharLiteral(literal);
  /external/antlr/antlr-3.4/tool/src/main/java/org/antlr/tool/
GrammarSyntaxMessage.java 34 /** A problem with the syntax of your antlr grammar such as
38 public Grammar g;
44 Grammar grammar,
48 this(msgID,grammar,offendingToken,null,exception);
52 Grammar grammar,
60 this.g = grammar;
70 // TODO: actually set the right Grammar instance to get the filename
71 // TODO: have to update all v2 grammar files for this. or use errormanager and tool to get the current gramma
    [all...]
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...]
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...]
Interp.java 41 /** Interpret any ANTLR grammar:
77 Grammar parser = new Grammar(tool, grammarFileName, composite);
99 Grammar lexer = new Grammar(tool);
107 System.err.println("no lexer grammar found in "+grammarFileName);
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...]
RandomPhrase.java 45 /** Generate a random phrase given a grammar.
67 * grammar given a start rule. Return a list of token types.
69 protected static void randomPhrase(Grammar g, List<Integer> tokenTypes, String startRule) {
157 Grammar parser = new Grammar(tool, grammarFileName, composite);
180 Grammar lexer = new Grammar(tool);
187 System.err.println("no lexer grammar found in "+grammarFileName);
  /external/antlr/antlr-3.4/tool/src/main/antlr3/org/antlr/grammar/v3/
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...]
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...]
AssignTokenTypesWalker.g 6 Grammar conversion to ANTLR v3:
38 * a few different cases to consider for grammar types and a few situations
41 * CASE 1 : pure parser grammar
45 * CASE 2 : pure lexer grammar
51 * CASE 3 : merged parser / lexer grammar
60 * references to either in the parser grammar will yield the token type
64 * 0. Collects basic info about the grammar like grammar name and type;
76 * 4. Informs the Grammar object of the type definitions such as:
82 tree grammar AssignTokenTypesWalker
    [all...]
ANTLR.g 6 Grammar conversion to ANTLR v3:
33 /** Read in an ANTLR grammar and build an AST. Try not to do
50 grammar ANTLR;
66 GRAMMAR='grammar';
112 package org.antlr.grammar.v3;
114 import org.antlr.tool.Grammar;
118 package org.antlr.grammar.v3;
120 import org.antlr.tool.Grammar;
142 protected boolean atTreeRoot; // are we matching a tree root in tree grammar
    [all...]
CodeGenTreeWalker.g 6 Grammar conversion to ANTLR v3:
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 )
    [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...]

Completed in 231 milliseconds

12 3 4 5 6