/external/antlr/antlr-3.4/tool/src/test/java/org/antlr/test/ |
D | TestAutoAST.java | 37 String grammar = in testTokenList() local 44 String found = execParser("foo.g", grammar, "fooParser", "fooLexer", in testTokenList() 50 String grammar = in testTokenListInSingleAltBlock() local 57 String found = execParser("foo.g", grammar, "fooParser", "fooLexer", in testTokenListInSingleAltBlock() 63 String grammar = in testSimpleRootAtOuterLevel() local 70 String found = execParser("foo.g", grammar, "fooParser", "fooLexer", in testSimpleRootAtOuterLevel() 76 String grammar = in testSimpleRootAtOuterLevelReverse() local 83 String found = execParser("T.g", grammar, "TParser", "TLexer", in testSimpleRootAtOuterLevelReverse() 89 String grammar = in testBang() local 96 String found = execParser("T.g", grammar, "TParser", "TLexer", in testBang() [all …]
|
D | TestRewriteAST.java | 42 String grammar = in testDelete() local 49 String found = execParser("T.g", grammar, "TParser", "TLexer", in testDelete() 55 String grammar = in testSingleToken() local 62 String found = execParser("T.g", grammar, "TParser", "TLexer", in testSingleToken() 68 String grammar = in testSingleTokenToNewNode() local 75 String found = execParser("T.g", grammar, "TParser", "TLexer", in testSingleTokenToNewNode() 81 String grammar = in testSingleTokenToNewNodeRoot() local 88 String found = execParser("T.g", grammar, "TParser", "TLexer", in testSingleTokenToNewNodeRoot() 95 String grammar = in testSingleTokenToNewNode2() local 102 String found = execParser("TT.g", grammar, "TTParser", "TTLexer", in testSingleTokenToNewNode2() [all …]
|
D | TestTreeGrammarRewriteAST.java | 48 String grammar = in testFlatList() local 62 String found = execTreeParser("T.g", grammar, "TParser", "TP.g", in testFlatList() 68 String grammar = in testSimpleTree() local 82 String found = execTreeParser("T.g", grammar, "TParser", "TP.g", in testSimpleTree() 88 String grammar = in testNonImaginaryWithCtor() local 101 String found = execTreeParser("T.g", grammar, "TParser", "TP.g", in testNonImaginaryWithCtor() 107 String grammar = in testCombinedRewriteAndAuto() local 121 String found = execTreeParser("T.g", grammar, "TParser", "TP.g", in testCombinedRewriteAndAuto() 125 found = execTreeParser("T.g", grammar, "TParser", "TP.g", in testCombinedRewriteAndAuto() 131 String grammar = in testAvoidDup() local [all …]
|
D | TestSets.java | 43 String grammar = in testSeqDoesNotBecomeSet() local 49 String found = execParser("P.g", grammar, "PParser", "PLexer", in testSeqDoesNotBecomeSet() 55 String grammar = in testParserSet() local 58 String found = execParser("T.g", grammar, "TParser", "TLexer", in testParserSet() 64 String grammar = in testParserNotSet() local 67 String found = execParser("T.g", grammar, "TParser", "TLexer", in testParserNotSet() 73 String grammar = in testParserNotToken() local 76 String found = execParser("T.g", grammar, "TParser", "TLexer", in testParserNotToken() 82 String grammar = in testParserNotTokenWithLabel() local 85 String found = execParser("T.g", grammar, "TParser", "TLexer", in testParserNotTokenWithLabel() [all …]
|
D | TestHeteroAST.java | 39 String grammar = in testToken() local 50 String found = execParser("T.g", grammar, "TParser", "TLexer", in testToken() 56 String grammar = in testTokenCommonTree() local 62 String found = execParser("T.g", grammar, "TParser", "TLexer", in testTokenCommonTree() 68 String grammar = in testTokenWithQualifiedType() local 79 String found = execParser("T.g", grammar, "TParser", "TLexer", in testTokenWithQualifiedType() 85 String grammar = in testNamedType() local 96 String found = execParser("T.g", grammar, "TParser", "TLexer", in testNamedType() 103 String grammar = in testTokenWithLabel() local 114 String found = execParser("T.g", grammar, "TParser", "TLexer", in testTokenWithLabel() [all …]
|
D | TestSemanticPredicateEvaluation.java | 34 String grammar = in testSimpleCyclicDFAWithPredicate() local 39 String found = execParser("foo.g", grammar, "fooParser", "fooLexer", in testSimpleCyclicDFAWithPredicate() 45 String grammar = in testSimpleCyclicDFAWithInstanceVarPredicate() local 51 String found = execParser("foo.g", grammar, "fooParser", "fooLexer", in testSimpleCyclicDFAWithInstanceVarPredicate() 57 String grammar = in testPredicateValidation() local 67 String found = execParser("foo.g", grammar, "fooParser", "fooLexer", in testPredicateValidation() 73 String grammar = in testLexerPreds() local 79 String found = execParser("foo.g", grammar, "fooParser", "fooLexer", in testLexerPreds() 86 String grammar = in testLexerPreds2() local 92 String found = execParser("foo.g", grammar, "fooParser", "fooLexer", in testLexerPreds2() [all …]
|
D | TestSyntacticPredicateEvaluation.java | 34 String grammar = in testTwoPredsWithNakedAlt() local 53 String found = execParser("T.g", grammar, "TParser", "TLexer", in testTwoPredsWithNakedAlt() 62 found = execParser("T.g", grammar, "TParser", "TLexer", in testTwoPredsWithNakedAlt() 70 found = execParser("T.g", grammar, "TParser", "TLexer", in testTwoPredsWithNakedAlt() 83 String grammar = in testTwoPredsWithNakedAltNotLast() local 102 String found = execParser("T.g", grammar, "TParser", "TLexer", in testTwoPredsWithNakedAltNotLast() 111 found = execParser("T.g", grammar, "TParser", "TLexer", in testTwoPredsWithNakedAltNotLast() 119 found = execParser("T.g", grammar, "TParser", "TLexer", in testTwoPredsWithNakedAltNotLast() 131 String grammar = in testLexerPred() local 140 String found = execParser("T.g", grammar, "TParser", "TLexer", in testLexerPred() [all …]
|
D | TestLeftRecursion.java | 10 String grammar = in testSimple() local 18 String found = execParser("T.g", grammar, "TParser", "TLexer", in testSimple() 25 String grammar = in testSemPred() local 33 String found = execParser("T.g", grammar, "TParser", "TLexer", in testSemPred() 40 String grammar = in testTernaryExpr() local 62 runTests(grammar, tests, "e"); in testTernaryExpr() 66 String grammar = in testDeclarationsUsingASTOperators() local 93 runTests(grammar, tests, "declarator"); in testDeclarationsUsingASTOperators() 97 String grammar = in testDeclarationsUsingRewriteOperators() local 124 runTests(grammar, tests, "declarator"); in testDeclarationsUsingRewriteOperators() [all …]
|
D | TestTreeParsing.java | 34 String grammar = in testFlatList() local 48 String found = execTreeParser("T.g", grammar, "TParser", "TP.g", in testFlatList() 54 String grammar = in testSimpleTree() local 68 String found = execTreeParser("T.g", grammar, "TParser", "TP.g", in testSimpleTree() 74 String grammar = in testFlatVsTreeDecision() local 91 String found = execTreeParser("T.g", grammar, "TParser", "TP.g", in testFlatVsTreeDecision() 97 String grammar = in testFlatVsTreeDecision2() local 114 String found = execTreeParser("T.g", grammar, "TParser", "TP.g", in testFlatVsTreeDecision2() 121 String grammar = in testCyclicDFALookahead() local 137 String found = execTreeParser("T.g", grammar, "TParser", "TP.g", in testCyclicDFALookahead() [all …]
|
D | TestLexer.java | 46 String grammar = in testSetText() local 51 String found = execParser("P.g", grammar, "PParser", "PLexer", in testSetText() 59 String grammar = in testRefToRuleDoesNotSetTokenNorEmitAnother() local 65 String found = execParser("P.g", grammar, "PParser", "PLexer", in testRefToRuleDoesNotSetTokenNorEmitAnother() 73 String grammar = in testRefToRuleDoesNotSetChannel() local 79 String found = execParser("P.g", grammar, "PParser", "PLexer", in testRefToRuleDoesNotSetChannel() 85 String grammar = in testWeCanSetType() local 92 String found = execParser("P.g", grammar, "PParser", "PLexer", in testWeCanSetType() 100 String grammar = in testRefToFragment() local 106 String found = execParser("P.g", grammar, "PParser", "PLexer", in testRefToFragment() [all …]
|
D | TestRewriteTemplates.java | 39 String grammar = in testDelete() local 46 String found = execParser("T.g", grammar, "TParser", "TLexer", in testDelete() 52 String grammar = in testAction() local 59 String found = execParser("T.g", grammar, "TParser", "TLexer", in testAction() 65 String grammar = in testEmbeddedLiteralConstructor() local 72 String found = execParser("T.g", grammar, "TParser", "TLexer", in testEmbeddedLiteralConstructor() 78 String grammar = in testInlineTemplate() local 85 String found = execParser("T.g", grammar, "TParser", "TLexer", in testInlineTemplate() 93 String grammar = in testNamedTemplate() local 100 String found = execParser("T.g", grammar, "TParser", "TLexer", in testNamedTemplate() [all …]
|
D | TestJavaCodeGeneration.java | 41 String grammar = in testDupVarDefForPinchedState() local 48 "T.g", grammar, "TParser", null, false); in testDupVarDefForPinchedState() 55 String grammar = in testLabeledNotSetsInLexer() local 61 "T.g", grammar, null, "T", false); in testLabeledNotSetsInLexer() 68 String grammar = in testLabeledSetsInLexer() local 73 String found = execParser("T.g", grammar, "TParser", "TLexer", in testLabeledSetsInLexer() 80 String grammar = in testLabeledRangeInLexer() local 85 String found = execParser("T.g", grammar, "TParser", "TLexer", in testLabeledRangeInLexer() 92 String grammar = in testLabeledWildcardInLexer() local 97 String found = execParser("T.g", grammar, "TParser", "TLexer", in testLabeledWildcardInLexer() [all …]
|
D | TestSyntaxErrors.java | 36 String grammar = in testLL2() local 42 String found = execParser("T.g", grammar, "TParser", "TLexer", "a", "ae", false); in testLL2() 49 String grammar = in testLL3() local 55 System.out.println(grammar); in testLL3() 56 String found = execParser("T.g", grammar, "TParser", "TLexer", "a", "abe", false); in testLL3() 63 String grammar = in testLLStar() local 69 String found = execParser("T.g", grammar, "TParser", "TLexer", "a", "aaae", false); in testLLStar() 76 String grammar = in testSynPred() local 85 System.out.println(grammar); in testSynPred() 86 String found = execParser("T.g", grammar, "TParser", "TLexer", "a", "((i))z", false); in testSynPred() [all …]
|
/external/antlr/antlr-3.4/runtime/Python/tests/ |
D | t058rewriteAST.py | 64 def execParser(self, grammar, grammarEntry, input, expectErrors=False): argument 65 lexerCls, parserCls = self.compileInlineGrammar(grammar) 92 def execTreeParser(self, grammar, grammarEntry, treeGrammar, treeEntry, input): argument 93 lexerCls, parserCls = self.compileInlineGrammar(grammar) 113 grammar = textwrap.dedent( 123 found = self.execParser(grammar, "a", "abc 34") 128 grammar = textwrap.dedent( 138 found = self.execParser(grammar, "a", "abc") 143 grammar = textwrap.dedent( 153 found = self.execParser(grammar, "a", "abc") [all …]
|
D | t057autoAST.py | 64 def execParser(self, grammar, grammarEntry, input, expectErrors=False): argument 65 lexerCls, parserCls = self.compileInlineGrammar(grammar) 92 def execTreeParser(self, grammar, grammarEntry, treeGrammar, treeEntry, input): argument 93 lexerCls, parserCls = self.compileInlineGrammar(grammar) 113 grammar = textwrap.dedent( 123 found = self.execParser(grammar, "a", "abc 34") 128 grammar = textwrap.dedent( 138 found = self.execParser(grammar,"a", "abc 34") 143 grammar = textwrap.dedent( 153 found = self.execParser(grammar, "a", "abc 34") [all …]
|
D | t051treeRewriteAST.py | 29 def execTreeParser(self, grammar, grammarEntry, treeGrammar, treeEntry, input): argument 30 lexerCls, parserCls = self.compileInlineGrammar(grammar) 50 grammar = textwrap.dedent( 77 grammar, 'a', 86 grammar = textwrap.dedent( 112 grammar, 'a', 121 grammar = textwrap.dedent( 147 grammar, 'a', 156 grammar, 'a', 165 grammar = textwrap.dedent( [all …]
|
D | t053hetero.py | 63 def execParser(self, grammar, grammarEntry, input): argument 64 lexerCls, parserCls = self.compileInlineGrammar(grammar) 78 def execTreeParser(self, grammar, grammarEntry, treeGrammar, treeEntry, input): argument 79 lexerCls, parserCls = self.compileInlineGrammar(grammar) 101 grammar = textwrap.dedent( 121 grammar, 'a', 129 grammar = textwrap.dedent( 142 grammar, 'a', 149 grammar = textwrap.dedent( 168 grammar, 'a', [all …]
|
D | t049treeparser.py | 35 def execTreeParser(self, grammar, grammarEntry, treeGrammar, treeEntry, input): argument 36 lexerCls, parserCls = self.compileInlineGrammar(grammar) 53 grammar = textwrap.dedent( 77 grammar, 'a', 87 grammar = textwrap.dedent( 111 grammar, 'a', 120 grammar = textwrap.dedent( 147 grammar, 'a', 155 grammar = textwrap.dedent( 182 grammar, 'a', [all …]
|
D | t055templates.py | 12 def execParser(self, grammar, grammarEntry, input, group=None): argument 13 lexerCls, parserCls = self.compileInlineGrammar(grammar) 28 grammar = textwrap.dedent( 46 grammar, 'a', 68 grammar = textwrap.dedent( 86 grammar, 'a', 95 grammar = textwrap.dedent( 112 grammar, 'a', 120 grammar = textwrap.dedent( 141 grammar, 'a', [all …]
|
D | t059debug.py | 74 def execParser(self, grammar, grammarEntry, input, listener, argument 87 grammar, options='-debug') 101 grammar = textwrap.dedent( 115 grammar, 'a', 138 grammar = textwrap.dedent( 150 grammar, 'a', 173 grammar = textwrap.dedent( 185 grammar, 'a', 218 grammar = textwrap.dedent( 230 grammar, 'a', [all …]
|
/external/antlr/antlr-3.4/runtime/Ruby/test/functional/debugging/ |
D | debug-mode.rb | 66 def parse( grammar, rule, input, options = {} ) argument 67 @grammar = inline_grammar( grammar ) 91 grammar = %q< 99 parse( grammar, :a, 'a', :listener => listener ) 114 grammar = %q< 121 debugger = parse( grammar, :a, 'a' ) 144 grammar = %q< 151 debugger = parse( grammar, :a, "a b" ) 181 grammar = %q< 189 debugger = parse( grammar, :a, "a" ) [all …]
|
/external/antlr/antlr-3.4/tool/src/main/java/org/antlr/tool/ |
D | NameSpaceChecker.java | 38 protected Grammar grammar; field in NameSpaceChecker 40 public NameSpaceChecker(Grammar grammar) { in NameSpaceChecker() argument 41 this.grammar = grammar; in NameSpaceChecker() 45 …for (int i = CompositeGrammar.MIN_RULE_INDEX; i < grammar.composite.ruleIndexToRuleList.size(); i+… in checkConflicts() 46 Rule r = grammar.composite.ruleIndexToRuleList.elementAt(i); in checkConflicts() 70 Iterator it = grammar.getGlobalScopes().values().iterator(); in checkConflicts() 87 grammar, in checkForRuleArgumentAndReturnValueConflicts() 100 if ( (grammar.type==Grammar.PARSER||grammar.type==Grammar.TREE_PARSER) && in checkForRuleDefinitionProblems() 105 else if ( grammar.type==Grammar.LEXER && in checkForRuleDefinitionProblems() 111 else if ( grammar.getGlobalScope(ruleName)!=null ) { in checkForRuleDefinitionProblems() [all …]
|
D | Interpreter.java | 50 protected Grammar grammar; field in Interpreter 74 public Interpreter(Grammar grammar, IntStream input) { in Interpreter() argument 75 this.grammar = grammar; in Interpreter() 80 if ( grammar.type!=Grammar.LEXER ) { in nextToken() 129 if ( grammar.type!=Grammar.LEXER ) { in scan() 135 if ( grammar.getRuleStartState(startRule)==null ) { in scan() 136 grammar.buildNFA(); in scan() 139 if ( !grammar.allDecisionDFAHaveBeenCreated() ) { in scan() 141 grammar.createLookaheadDFAs(); in scan() 146 NFAState start = grammar.getRuleStartState(startRule); in scan() [all …]
|
/external/antlr/antlr-3.4/runtime/Ruby/lib/antlr3/test/ |
D | functional.rb | 49 def import_grammar_targets( grammar ) argument 50 for file in grammar.target_files 112 grammar = Grammar.new( path, :output_directory => output_directory ) 113 register_grammar( grammar ) 114 return grammar 119 grammar = Grammar.inline source, 123 register_grammar( grammar ) 124 return grammar 133 def compile( grammar, options = {} ) argument 134 grammar.compile( compile_options.merge( options ) ) [all …]
|
/external/antlr/antlr-3.4/tool/src/main/java/org/antlr/codegen/ |
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; 94 public Grammar grammar; field in CodeGenerator 153 public CodeGenerator(Tool tool, Grammar grammar, String language) { in CodeGenerator() argument 155 this.grammar = grammar; in CodeGenerator() 197 String outputOption = (String)grammar.getOption("output"); in loadTemplates() 199 if ( debug && grammar.type!=Grammar.LEXER ) { in loadTemplates() 206 if ( grammar.type==Grammar.TREE_PARSER ) { in loadTemplates() [all …]
|