/external/antlr/antlr-3.4/tool/src/test/java/org/antlr/test/ |
D | TestNFAConstruction.java | 32 import org.antlr.tool.Grammar; 42 Grammar g = new Grammar( in testA() 55 Grammar g = new Grammar( in testAB() 69 Grammar g = new Grammar( in testAorB() 92 Grammar g = new Grammar( in testRangeOrRange() 114 Grammar g = new Grammar( in testRange() 128 Grammar g = new Grammar( in testCharSetInParser() 142 Grammar g = new Grammar( in testABorCD() 162 Grammar g = new Grammar( in testbA() 182 Grammar g = new Grammar( in testbA_bC() [all …]
|
D | TestASTConstruction.java | 30 import org.antlr.tool.Grammar; 40 Grammar g = new Grammar( in testA() 50 Grammar g = new Grammar( in testEmptyAlt() 60 Grammar g = new Grammar( in testNakeRulePlusInLexer() 71 Grammar g = new Grammar( in testRulePlus() 82 Grammar g = new Grammar( in testNakedRulePlus() 93 Grammar g = new Grammar( in testRuleOptional() 104 Grammar g = new Grammar( in testNakedRuleOptional() 115 Grammar g = new Grammar( in testRuleStar() 126 Grammar g = new Grammar( in testNakedRuleStar() [all …]
|
D | TestCharDFAConversion.java | 47 Grammar g = new Grammar( in testSimpleRangeVersusChar() 60 Grammar g = new Grammar( in testRangeWithDisjointSet() 77 Grammar g = new Grammar( in testDisjointSetCollidingWithTwoRanges() 94 Grammar g = new Grammar( in testDisjointSetCollidingWithTwoRangesCharsFirst() 110 Grammar g = new Grammar( in testDisjointSetCollidingWithTwoRangesAsSeparateAlts() 136 Grammar g = new Grammar( in testKeywordVersusID() 155 Grammar g = new Grammar( in testIdenticalRules() 179 Grammar g = new Grammar( in testAdjacentNotCharLoops() 194 Grammar g = new Grammar( in testNonAdjacentNotCharLoops() 209 Grammar g = new Grammar( in testLoopsWithOptimizedOutExitBranches() [all …]
|
D | TestSemanticPredicates.java | 49 Grammar g = new Grammar( in testPredsButSyntaxResolves() 59 Grammar g = new Grammar( in testLL_1_Pred() 71 Grammar g = new Grammar( in testLL_1_Pred_forced_k_1() 82 Grammar g = new Grammar( in testLL_2_Pred() 94 Grammar g = new Grammar( in testPredicatedLoop() 106 Grammar g = new Grammar( in testPredicatedToStayInLoop() 117 Grammar g = new Grammar( in testAndPredicates() 129 Grammar g = new Grammar( in testOrPredicates() 141 Grammar g = new Grammar( in testIgnoresHoistingDepthGreaterThanZero() 151 Grammar g = new Grammar( in testIgnoresPredsHiddenByActions() [all …]
|
D | TestDFAConversion.java | 43 Grammar g = new Grammar( in testA() 53 Grammar g = new Grammar( in testAB_or_AC() 64 Grammar g = new Grammar( in testAB_or_AC_k2() 76 Grammar g = new Grammar( in testAB_or_AC_k1() 92 Grammar g = new Grammar( in testselfRecurseNonDet() 101 Grammar g = new Grammar( in testRecursionOverflow() 111 Grammar g = new Grammar( in testRecursionOverflow2() 123 Grammar g = new Grammar( in testRecursionOverflowWithPredOk() 151 Grammar g = new Grammar( in testRecursionOverflowWithPredOk2() 179 Grammar g = new Grammar( in testCannotSeePastRecursion() [all …]
|
D | TestSymbolDefinitions.java | 46 Grammar g = new Grammar( in testParserSimpleTokens() 56 Grammar g = new Grammar( in testParserTokensSection() 70 Grammar g = new Grammar( in testLexerTokensSection() 84 Grammar g = new Grammar( in testTokensSectionWithAssignmentSection() 98 Grammar g = new Grammar( in testCombinedGrammarLiterals() 112 Grammar g = new Grammar( in testLiteralInParserAndLexer() 130 Grammar g = new Grammar( in testCombinedGrammarWithRefToLiteralButNoTokenIDRef() 140 Grammar g = new Grammar( in testSetDoesNotMissTokenAliases() 151 Grammar g = new Grammar( in testSimplePlusEqualLabel() 161 Grammar g = new Grammar( in testMixedPlusEqualLabel() [all …]
|
D | TestTokenRewriteStream.java | 33 import org.antlr.tool.Grammar; 44 Grammar g = new Grammar( in testInsertBeforeIndex0() 59 Grammar g = new Grammar( in testInsertAfterLastIndex() 74 Grammar g = new Grammar( in test2InsertBeforeAfterMiddleIndex() 91 Grammar g = new Grammar( in testReplaceIndex0() 107 Grammar g = new Grammar( in testReplaceLastIndex() 123 Grammar g = new Grammar( in testReplaceMiddleIndex() 139 Grammar g = new Grammar( in testToStringStartStop() 173 Grammar g = new Grammar( in testToStringStartStop2() 226 Grammar g = new Grammar( in test2ReplaceMiddleIndex() [all …]
|
D | TestInterpretedParsing.java | 33 import org.antlr.tool.Grammar; 43 Grammar pg = new Grammar( in testSimpleParse() 48 Grammar g = new Grammar(); in testSimpleParse() 50 g.setFileName(Grammar.IGNORE_STRING_IN_GRAMMAR_FILE_NAME +"string"); in testSimpleParse() 78 Grammar pg = new Grammar( in testMismatchedTokenError() 83 Grammar g = new Grammar(); in testMismatchedTokenError() 84 g.setFileName(Grammar.IGNORE_STRING_IN_GRAMMAR_FILE_NAME +"string"); in testMismatchedTokenError() 113 Grammar pg = new Grammar( in testMismatchedSetError() 118 Grammar g = new Grammar(); in testMismatchedSetError() 148 Grammar pg = new Grammar( in testNoViableAltError() [all …]
|
D | TestAttributes.java | 55 Grammar g = new Grammar(); in testEscapedLessThanInAction() 75 Grammar g = new Grammar( in testEscaped$InAction() 98 Grammar g = new Grammar( in testArguments() 123 Grammar g = new Grammar( in testComplicatedArgParsing() 145 Grammar g = new Grammar( in testBracketArgParsing() 176 Grammar g = new Grammar( in testStringArgParsing() 212 Grammar g = new Grammar( in testComplicatedSingleArgParsing() 237 Grammar g = new Grammar( in testArgWithLT() 266 Grammar g = new Grammar(grammar); in testGenericsAsArgumentDefinition() 295 Grammar g = new Grammar(grammar); in testGenericsAsArgumentDefinition2() [all …]
|
D | TestInterpretedLexing.java | 34 import org.antlr.tool.Grammar; 80 Grammar g = new Grammar( in testSimpleAltCharTest() 94 Grammar g = new Grammar( in testSingleRuleRef() 105 Grammar g = new Grammar( in testSimpleLoop() 119 Grammar g = new Grammar( in testMultAltLoop() 146 Grammar g = new Grammar( in testSimpleLoops() 157 Grammar pg = new Grammar( in testTokensRules() 160 Grammar g = new Grammar(); in testTokensRules()
|
D | TestDFAMatching.java | 33 import org.antlr.tool.Grammar; 43 Grammar g = new Grammar( in testSimpleAltCharTest() 56 Grammar g = new Grammar( in testSets() 70 Grammar g = new Grammar( in testFiniteCommonLeftPrefixes() 83 Grammar g = new Grammar( in testSimpleLoops()
|
D | TestTemplates.java | 38 import org.antlr.tool.Grammar; 55 Grammar g = new Grammar( in testTemplateConstructor() 92 Grammar g = new Grammar( in testTemplateConstructorNoArgs() 130 Grammar g = new Grammar( in testIndirectTemplateConstructor() 166 Grammar g = new Grammar( in testStringConstructor() 201 Grammar g = new Grammar( in testSetAttr() 237 Grammar g = new Grammar( in testSetAttrOfExpr() 269 Grammar g = new Grammar( in testSetAttrOfExprInMembers() 295 Grammar g = new Grammar( in testCannotHaveSpaceBeforeDot() 323 Grammar g = new Grammar( in testCannotHaveSpaceAfterDot()
|
D | TestCommonTokenStream.java | 32 import org.antlr.tool.Grammar; 39 Grammar g = new Grammar( in testFirstToken() 60 Grammar g = new Grammar( in test2ndToken() 81 Grammar g = new Grammar( in testCompleteBuffer() 111 Grammar g = new Grammar( in testCompleteBufferAfterConsuming() 142 Grammar g = new Grammar( in testLookback()
|
D | TestCompositeGrammars.java | 45 Grammar g = new Grammar(grammar); in testWildcardStillWorks() 212 Grammar g = new Grammar(antlr,tmpdir+"/M.g",composite); in testDelegatesSeeSameTokenType2() 250 Grammar g = new Grammar(antlr,tmpdir+"/M.g",composite); in testCombinedImportsCombined() 284 Grammar g = new Grammar(antlr,tmpdir+"/M.g",composite); in testSameStringTwoNames() 337 Grammar g = new Grammar(antlr,tmpdir+"/M.g",composite); in testSameNameTwoStrings() 385 Grammar g = new Grammar(antlr,tmpdir+"/M.g",composite); in testImportedTokenVocabIgnoredWithWarning() 427 Grammar g = new Grammar(antlr,tmpdir+"/M.g",composite); in testImportedTokenVocabWorksInRoot() 462 Grammar g = new Grammar(antlr,tmpdir+"/M.g",composite); in testSyntaxErrorsInImportsNotThrownOut() 488 Grammar g = new Grammar(antlr,tmpdir+"/M.g",composite); in testSyntaxErrorsInImportsNotThrownOut2() 619 Grammar g = new Grammar(antlr,tmpdir+"/M.g",composite); in testLexerDelegatorRuleOverridesDelegateLeavingNoRules() [all …]
|
D | TestRewriteTemplates.java | 239 Grammar g = new Grammar( in testRewriteRuleAndRewriteModeOnSimpleElements() 260 Grammar g = new Grammar( in testRewriteRuleAndRewriteModeIgnoreActionsPredicates() 282 Grammar g = new Grammar( in testRewriteRuleAndRewriteModeNotSimple() 301 Grammar g = new Grammar( in testRewriteRuleAndRewriteModeRefRule()
|
/external/antlr/antlr-3.4/tool/src/main/java/org/antlr/tool/ |
D | CompositeGrammar.java | 147 public CompositeGrammar(Grammar g) { in CompositeGrammar() 152 public void setDelegationRoot(Grammar root) { in setDelegationRoot() 166 public void addGrammar(Grammar delegator, Grammar delegate) { in addGrammar() 181 public Grammar getDelegator(Grammar g) { in getDelegator() 196 public List<Grammar> getDelegates(Grammar g) { in getDelegates() 201 List<Grammar> grammars = t.getPostOrderedGrammarList(); in getDelegates() 206 public List<Grammar> getDirectDelegates(Grammar g) { in getDirectDelegates() 212 List<Grammar> grammars = new ArrayList(); in getDirectDelegates() 221 public List<Grammar> getIndirectDelegates(Grammar g) { in getIndirectDelegates() 222 List<Grammar> direct = getDirectDelegates(g); in getIndirectDelegates() [all …]
|
D | CompositeGrammarTree.java | 36 public Grammar grammar; 41 public CompositeGrammarTree(Grammar g) { in CompositeGrammarTree() 85 public CompositeGrammarTree findNode(Grammar g) { in findNode() 116 public List<Grammar> getPostOrderedGrammarList() { in getPostOrderedGrammarList() 117 List<Grammar> grammars = new ArrayList<Grammar>(); in getPostOrderedGrammarList() 123 protected void _getPostOrderedGrammarList(List<Grammar> grammars) { in _getPostOrderedGrammarList() 132 public List<Grammar> getPreOrderedGrammarList() { in getPreOrderedGrammarList() 133 List<Grammar> grammars = new ArrayList<Grammar>(); in getPreOrderedGrammarList() 138 protected void _getPreOrderedGrammarList(List<Grammar> grammars) { in _getPreOrderedGrammarList() 148 if ( p.grammar.type == Grammar.LEXER && p.parent!=null && in trimLexerImportsIntoCombined() [all …]
|
D | Rule.java | 61 public Grammar grammar; 106 protected Map<String, Grammar.LabelElementPair> labelNameSpace = 107 new HashMap<String, Grammar.LabelElementPair>(); 160 public Rule(Grammar grammar, in Rule() 181 return Character.isUpperCase(ruleName.charAt(0)) ? Grammar.LEXER : Grammar.PARSER; in getRuleType() 185 Grammar.LabelElementPair pair = grammar.new LabelElementPair(label,elementRef); in defineLabel() 189 case Grammar.TOKEN_LABEL : in defineLabel() 193 case Grammar.WILDCARD_TREE_LABEL : in defineLabel() 197 case Grammar.WILDCARD_TREE_LIST_LABEL : in defineLabel() 201 case Grammar.RULE_LABEL : in defineLabel() [all …]
|
D | AssignTokenTypesBehavior.java | 57 protected void init(Grammar g) { in init() 70 if ( currentRuleName==null && grammar.type==Grammar.LEXER ) { in trackString() 81 grammar.type==Grammar.PARSER && in trackString() 90 if ( grammar.type==Grammar.LEXER ) { in trackString() 121 if ( grammar.type==Grammar.LEXER || grammar.type==Grammar.COMBINED ) { in trackTokenRule() 125 if ( t.getText().equals(Grammar.ARTIFICIAL_TOKENS_RULENAME) ) { in trackTokenRule() 152 if ( grammar.type==Grammar.COMBINED || grammar.type==Grammar.LEXER ) { in trackTokenRule() 206 public void defineTokens(Grammar root) { in defineTokens() 248 protected void assignStringTypes(Grammar root) { in assignStringTypes() 266 protected void aliasTokenIDsAndLiterals(Grammar root) { in aliasTokenIDsAndLiterals() [all …]
|
D | NameSpaceChecker.java | 38 protected Grammar grammar; 40 public NameSpaceChecker(Grammar grammar) { in NameSpaceChecker() 54 Grammar.LabelElementPair pair = (Grammar.LabelElementPair) it.next(); in checkConflicts() 100 if ( (grammar.type==Grammar.PARSER||grammar.type==Grammar.TREE_PARSER) && in checkForRuleDefinitionProblems() 105 else if ( grammar.type==Grammar.LEXER && in checkForRuleDefinitionProblems() 145 if ( grammar.type==Grammar.COMBINED ) { in lookForReferencesToUndefinedSymbols() 164 Grammar scopeG = grammar.composite.getGrammar(scopeAST.getText()); in lookForReferencesToUndefinedSymbols() 251 Grammar.LabelElementPair prevLabelPair = in checkForLabelTypeMismatch() 252 (Grammar.LabelElementPair)r.labelNameSpace.get(label.getText()); in checkForLabelTypeMismatch() 257 Grammar.LabelTypeToString[type]+"!="+ in checkForLabelTypeMismatch() [all …]
|
D | BuildDependencyGenerator.java | 81 protected Grammar grammar; 122 String suffix = Grammar.grammarTypeToFileNameSuffix[grammar.type]; in getGeneratedFileList() 126 if (grammar.type == Grammar.COMBINED) { in getGeneratedFileList() 130 String suffix = Grammar.grammarTypeToFileNameSuffix[Grammar.LEXER]; in getGeneratedFileList() 143 List<Grammar> imports = in getGeneratedFileList() 145 for (Grammar g : imports) { in getGeneratedFileList() 167 List<Grammar> imports = in getDependenciesFileList() 169 for (Grammar g : imports) { in getDependenciesFileList()
|
D | GrammarReport2.java | 40 public Grammar root; 42 public GrammarReport2(Grammar rootGrammar) { in GrammarReport2() 50 for (Grammar g : composite.getDelegates(root)) { in toString() 56 void stats(Grammar g, StringBuilder buf) { in stats() 59 Grammar.Decision d = g.getDecision(decision); in stats()
|
D | GrammarSemanticsMessage.java | 37 public Grammar g; 44 Grammar g, in GrammarSemanticsMessage() 51 Grammar g, in GrammarSemanticsMessage() 59 Grammar g, in GrammarSemanticsMessage()
|
/external/antlr/antlr-3.4/tool/src/main/java/org/antlr/codegen/ |
D | CTarget.java | 32 import org.antlr.tool.Grammar; 44 Grammar grammar, in genRecognizerFile() 59 Grammar grammar, in genRecognizerHeaderFile() 75 Grammar grammar, in chooseWhereCyclicDFAsGo() 90 case Grammar.LEXER: in isValidActionScope() 107 case Grammar.PARSER: in isValidActionScope() 124 case Grammar.COMBINED: in isValidActionScope() 144 case Grammar.TREE_PARSER: in isValidActionScope() 291 protected void performGrammarAnalysis(CodeGenerator generator, Grammar grammar) { in performGrammarAnalysis()
|
D | Target.java | 34 import org.antlr.tool.Grammar; 88 Grammar grammar, in genRecognizerFile() 99 Grammar grammar, in genRecognizerHeaderFile() 108 Grammar grammar) in performGrammarAnalysis() 125 case Grammar.LEXER : in isValidActionScope() 128 case Grammar.PARSER : in isValidActionScope() 131 case Grammar.COMBINED : in isValidActionScope() 135 case Grammar.TREE_PARSER : in isValidActionScope() 167 int c = Grammar.getCharValueFromGrammarCharLiteral(literal); in getTargetCharLiteralFromANTLRCharLiteral()
|