Home
last modified time | relevance | path

Searched refs:Grammar (Results 1 – 25 of 150) sorted by relevance

123456

/external/antlr/tool/src/test/java/org/antlr/test/
DTestNFAConstruction.java32 import org.antlr.tool.Grammar;
44 Grammar g = new Grammar( in testA()
57 Grammar g = new Grammar( in testAB()
71 Grammar g = new Grammar( in testAorB()
94 Grammar g = new Grammar( in testRangeOrRange()
116 Grammar g = new Grammar( in testRange()
130 Grammar g = new Grammar( in testCharSetInParser()
144 Grammar g = new Grammar( in testABorCD()
164 Grammar g = new Grammar( in testbA()
184 Grammar g = new Grammar( in testbA_bC()
[all …]
DTestASTConstruction.java30 import org.antlr.tool.Grammar;
42 Grammar g = new Grammar( in testA()
52 Grammar g = new Grammar( in testEmptyAlt()
62 Grammar g = new Grammar( in testNakeRulePlusInLexer()
73 Grammar g = new Grammar( in testRulePlus()
84 Grammar g = new Grammar( in testNakedRulePlus()
95 Grammar g = new Grammar( in testRuleOptional()
106 Grammar g = new Grammar( in testNakedRuleOptional()
117 Grammar g = new Grammar( in testRuleStar()
128 Grammar g = new Grammar( in testNakedRuleStar()
[all …]
DTestCharDFAConversion.java49 Grammar g = new Grammar( in testSimpleRangeVersusChar()
62 Grammar g = new Grammar( in testRangeWithDisjointSet()
79 Grammar g = new Grammar( in testDisjointSetCollidingWithTwoRanges()
96 Grammar g = new Grammar( in testDisjointSetCollidingWithTwoRangesCharsFirst()
112 Grammar g = new Grammar( in testDisjointSetCollidingWithTwoRangesAsSeparateAlts()
138 Grammar g = new Grammar( in testKeywordVersusID()
157 Grammar g = new Grammar( in testIdenticalRules()
181 Grammar g = new Grammar( in testAdjacentNotCharLoops()
196 Grammar g = new Grammar( in testNonAdjacentNotCharLoops()
211 Grammar g = new Grammar( in testLoopsWithOptimizedOutExitBranches()
[all …]
DTestDFAConversion.java46 Grammar g = new Grammar( in testA()
56 Grammar g = new Grammar( in testAB_or_AC()
67 Grammar g = new Grammar( in testAB_or_AC_k2()
79 Grammar g = new Grammar( in testAB_or_AC_k1()
95 Grammar g = new Grammar( in testselfRecurseNonDet()
104 Grammar g = new Grammar( in testRecursionOverflow()
114 Grammar g = new Grammar( in testRecursionOverflow2()
126 Grammar g = new Grammar( in testRecursionOverflowWithPredOk()
154 Grammar g = new Grammar( in testRecursionOverflowWithPredOk2()
182 Grammar g = new Grammar( in testCannotSeePastRecursion()
[all …]
DTestSemanticPredicates.java52 Grammar g = new Grammar( in testPredsButSyntaxResolves()
62 Grammar g = new Grammar( in testLL_1_Pred()
74 Grammar g = new Grammar( in testLL_1_Pred_forced_k_1()
85 Grammar g = new Grammar( in testLL_2_Pred()
97 Grammar g = new Grammar( in testPredicatedLoop()
109 Grammar g = new Grammar( in testPredicatedToStayInLoop()
120 Grammar g = new Grammar( in testAndPredicates()
132 Grammar g = new Grammar( in testOrPredicates()
144 Grammar g = new Grammar( in testIgnoresHoistingDepthGreaterThanZero()
154 Grammar g = new Grammar( in testIgnoresPredsHiddenByActions()
[all …]
DTestSymbolDefinitions.java48 Grammar g = new Grammar( in testParserSimpleTokens()
58 Grammar g = new Grammar( in testParserTokensSection()
72 Grammar g = new Grammar( in testLexerTokensSection()
86 Grammar g = new Grammar( in testTokensSectionWithAssignmentSection()
100 Grammar g = new Grammar( in testCombinedGrammarLiterals()
114 Grammar g = new Grammar( in testLiteralInParserAndLexer()
132 Grammar g = new Grammar( in testCombinedGrammarWithRefToLiteralButNoTokenIDRef()
142 Grammar g = new Grammar( in testSetDoesNotMissTokenAliases()
153 Grammar g = new Grammar( in testSimplePlusEqualLabel()
163 Grammar g = new Grammar( in testMixedPlusEqualLabel()
[all …]
DTestTokenRewriteStream.java33 import org.antlr.tool.Grammar;
46 Grammar g = new Grammar( in testInsertBeforeIndex0()
61 Grammar g = new Grammar( in testInsertAfterLastIndex()
76 Grammar g = new Grammar( in test2InsertBeforeAfterMiddleIndex()
93 Grammar g = new Grammar( in testReplaceIndex0()
109 Grammar g = new Grammar( in testReplaceLastIndex()
125 Grammar g = new Grammar( in testReplaceMiddleIndex()
141 Grammar g = new Grammar( in testToStringStartStop()
175 Grammar g = new Grammar( in testToStringStartStop2()
228 Grammar g = new Grammar( in test2ReplaceMiddleIndex()
[all …]
DTestAttributes.java57 Grammar g = new Grammar(); in testEscapedLessThanInAction()
77 Grammar g = new Grammar( in testEscaped$InAction()
100 Grammar g = new Grammar( in testArguments()
125 Grammar g = new Grammar( in testComplicatedArgParsing()
147 Grammar g = new Grammar( in testBracketArgParsing()
178 Grammar g = new Grammar( in testStringArgParsing()
214 Grammar g = new Grammar( in testComplicatedSingleArgParsing()
239 Grammar g = new Grammar( in testArgWithLT()
268 Grammar g = new Grammar(grammar); in testGenericsAsArgumentDefinition()
297 Grammar g = new Grammar(grammar); in testGenericsAsArgumentDefinition2()
[all …]
DTestInterpretedParsing.java33 import org.antlr.tool.Grammar;
45 Grammar pg = new Grammar( in testSimpleParse()
50 Grammar g = new Grammar(); in testSimpleParse()
52 g.setFileName(Grammar.IGNORE_STRING_IN_GRAMMAR_FILE_NAME +"string"); in testSimpleParse()
80 Grammar pg = new Grammar( in testMismatchedTokenError()
85 Grammar g = new Grammar(); in testMismatchedTokenError()
86 g.setFileName(Grammar.IGNORE_STRING_IN_GRAMMAR_FILE_NAME +"string"); in testMismatchedTokenError()
115 Grammar pg = new Grammar( in testMismatchedSetError()
120 Grammar g = new Grammar(); in testMismatchedSetError()
150 Grammar pg = new Grammar( in testNoViableAltError()
[all …]
DTestInterpretedLexing.java34 import org.antlr.tool.Grammar;
82 Grammar g = new Grammar( in testSimpleAltCharTest()
96 Grammar g = new Grammar( in testSingleRuleRef()
107 Grammar g = new Grammar( in testSimpleLoop()
121 Grammar g = new Grammar( in testMultAltLoop()
148 Grammar g = new Grammar( in testSimpleLoops()
159 Grammar pg = new Grammar( in testTokensRules()
162 Grammar g = new Grammar(); in testTokensRules()
DTestTemplates.java38 import org.antlr.tool.Grammar;
57 Grammar g = new Grammar( in testTemplateConstructor()
94 Grammar g = new Grammar( in testTemplateConstructorNoArgs()
132 Grammar g = new Grammar( in testIndirectTemplateConstructor()
168 Grammar g = new Grammar( in testStringConstructor()
203 Grammar g = new Grammar( in testSetAttr()
239 Grammar g = new Grammar( in testSetAttrOfExpr()
271 Grammar g = new Grammar( in testSetAttrOfExprInMembers()
297 Grammar g = new Grammar( in testCannotHaveSpaceBeforeDot()
325 Grammar g = new Grammar( in testCannotHaveSpaceAfterDot()
DTestDFAMatching.java33 import org.antlr.tool.Grammar;
45 Grammar g = new Grammar( in testSimpleAltCharTest()
58 Grammar g = new Grammar( in testSets()
72 Grammar g = new Grammar( in testFiniteCommonLeftPrefixes()
85 Grammar g = new Grammar( in testSimpleLoops()
DTestCommonTokenStream.java32 import org.antlr.tool.Grammar;
41 Grammar g = new Grammar( in testFirstToken()
62 Grammar g = new Grammar( in test2ndToken()
83 Grammar g = new Grammar( in testCompleteBuffer()
113 Grammar g = new Grammar( in testCompleteBufferAfterConsuming()
144 Grammar g = new Grammar( in testLookback()
DTestCompositeGrammars.java47 Grammar g = new Grammar(grammar); in testWildcardStillWorks()
214 Grammar g = new Grammar(antlr,tmpdir+"/M.g",composite); in testDelegatesSeeSameTokenType2()
252 Grammar g = new Grammar(antlr,tmpdir+"/M.g",composite); in testCombinedImportsCombined()
286 Grammar g = new Grammar(antlr,tmpdir+"/M.g",composite); in testSameStringTwoNames()
339 Grammar g = new Grammar(antlr,tmpdir+"/M.g",composite); in testSameNameTwoStrings()
387 Grammar g = new Grammar(antlr,tmpdir+"/M.g",composite); in testImportedTokenVocabIgnoredWithWarning()
429 Grammar g = new Grammar(antlr,tmpdir+"/M.g",composite); in testImportedTokenVocabWorksInRoot()
464 Grammar g = new Grammar(antlr,tmpdir+"/M.g",composite); in testSyntaxErrorsInImportsNotThrownOut()
490 Grammar g = new Grammar(antlr,tmpdir+"/M.g",composite); in testSyntaxErrorsInImportsNotThrownOut2()
621 Grammar g = new Grammar(antlr,tmpdir+"/M.g",composite); in testLexerDelegatorRuleOverridesDelegateLeavingNoRules()
[all …]
DTestRewriteTemplates.java241 Grammar g = new Grammar( in testRewriteRuleAndRewriteModeOnSimpleElements()
262 Grammar g = new Grammar( in testRewriteRuleAndRewriteModeIgnoreActionsPredicates()
284 Grammar g = new Grammar( in testRewriteRuleAndRewriteModeNotSimple()
303 Grammar g = new Grammar( in testRewriteRuleAndRewriteModeRefRule()
/external/antlr/tool/src/main/java/org/antlr/tool/
DCompositeGrammar.java156 public CompositeGrammar(Grammar g) { in CompositeGrammar()
161 public void setDelegationRoot(Grammar root) { in setDelegationRoot()
175 public void addGrammar(Grammar delegator, Grammar delegate) { in addGrammar()
190 public Grammar getDelegator(Grammar g) { in getDelegator()
205 public List<Grammar> getDelegates(Grammar g) { in getDelegates()
210 List<Grammar> grammars = t.getPostOrderedGrammarList(); in getDelegates()
215 public List<Grammar> getDirectDelegates(Grammar g) { in getDirectDelegates()
221 List<Grammar> grammars = new ArrayList<Grammar>(); in getDirectDelegates()
230 public List<Grammar> getIndirectDelegates(Grammar g) { in getIndirectDelegates()
231 List<Grammar> direct = getDirectDelegates(g); in getIndirectDelegates()
[all …]
DRule.java66 public Grammar grammar;
88 public LinkedHashMap<String, Grammar.LabelElementPair> tokenLabels;
91 public LinkedHashMap<String, Grammar.LabelElementPair> wildcardTreeLabels;
94 public LinkedHashMap<String, Grammar.LabelElementPair> wildcardTreeListLabels;
97 public LinkedHashMap<String, Grammar.LabelElementPair> charLabels;
100 public LinkedHashMap<String, Grammar.LabelElementPair> ruleLabels;
103 public LinkedHashMap<String, Grammar.LabelElementPair> tokenListLabels;
106 public LinkedHashMap<String, Grammar.LabelElementPair> ruleListLabels;
111 protected Map<String, Grammar.LabelElementPair> labelNameSpace =
112 new HashMap<String, Grammar.LabelElementPair>();
[all …]
DCompositeGrammarTree.java36 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 …]
DAssignTokenTypesBehavior.java56 protected void init(Grammar g) { in init()
69 if ( currentRuleName==null && grammar.type==Grammar.LEXER ) { in trackString()
80 grammar.type==Grammar.PARSER && in trackString()
89 if ( grammar.type==Grammar.LEXER ) { in trackString()
120 if ( grammar.type==Grammar.LEXER || grammar.type==Grammar.COMBINED ) { in trackTokenRule()
124 if ( t.getText().equals(Grammar.ARTIFICIAL_TOKENS_RULENAME) ) { in trackTokenRule()
151 if ( grammar.type==Grammar.COMBINED || grammar.type==Grammar.LEXER ) { in trackTokenRule()
205 public void defineTokens(Grammar root) { in defineTokens()
247 protected void assignStringTypes(Grammar root) { in assignStringTypes()
264 protected void aliasTokenIDsAndLiterals(Grammar root) { in aliasTokenIDsAndLiterals()
[all …]
DBuildDependencyGenerator.java80 protected Grammar grammar;
121 String suffix = Grammar.grammarTypeToFileNameSuffix[grammar.type]; in getGeneratedFileList()
125 if (grammar.type == Grammar.COMBINED) { in getGeneratedFileList()
129 String suffix = Grammar.grammarTypeToFileNameSuffix[Grammar.LEXER]; in getGeneratedFileList()
142 List<Grammar> imports = in getGeneratedFileList()
144 for (Grammar g : imports) { in getGeneratedFileList()
166 List<Grammar> imports = in getDependenciesFileList()
168 for (Grammar g : imports) { in getDependenciesFileList()
DNameSpaceChecker.java38 protected Grammar grammar;
40 public NameSpaceChecker(Grammar grammar) { in NameSpaceChecker()
52 for (Grammar.LabelElementPair pair : r.labelNameSpace.values()) { in checkConflicts()
95 if ( (grammar.type==Grammar.PARSER||grammar.type==Grammar.TREE_PARSER) && in checkForRuleDefinitionProblems()
100 else if ( grammar.type==Grammar.LEXER && in checkForRuleDefinitionProblems()
139 if ( grammar.type==Grammar.COMBINED ) { in lookForReferencesToUndefinedSymbols()
156 Grammar scopeG = grammar.composite.getGrammar(scopeAST.getText()); in lookForReferencesToUndefinedSymbols()
243 Grammar.LabelElementPair prevLabelPair = in checkForLabelTypeMismatch()
249 Grammar.LabelTypeToString[type]+"!="+ in checkForLabelTypeMismatch()
250 Grammar.LabelTypeToString[prevLabelPair.type]; in checkForLabelTypeMismatch()
DGrammarReport2.java40 public Grammar root;
42 public GrammarReport2(Grammar rootGrammar) { in GrammarReport2()
51 for (Grammar g : composite.getDelegates(root)) { in toString()
57 void stats(Grammar g, StringBuilder buf) { in stats()
60 Grammar.Decision d = g.getDecision(decision); in stats()
/external/antlr/tool/src/main/java/org/antlr/codegen/
DCTarget.java32 import org.antlr.tool.Grammar;
45 Grammar grammar, in genRecognizerFile()
60 Grammar grammar, in genRecognizerHeaderFile()
76 Grammar grammar, in chooseWhereCyclicDFAsGo()
91 case Grammar.LEXER: in isValidActionScope()
108 case Grammar.PARSER: in isValidActionScope()
125 case Grammar.COMBINED: in isValidActionScope()
145 case Grammar.TREE_PARSER: in isValidActionScope()
292 protected void performGrammarAnalysis(CodeGenerator generator, Grammar grammar) { in performGrammarAnalysis()
DTarget.java34 import org.antlr.tool.Grammar;
92 Grammar grammar, in genRecognizerFile()
103 Grammar grammar, in genRecognizerHeaderFile()
112 Grammar grammar) in performGrammarAnalysis()
129 case Grammar.LEXER : in isValidActionScope()
132 case Grammar.PARSER : in isValidActionScope()
135 case Grammar.COMBINED : in isValidActionScope()
139 case Grammar.TREE_PARSER : in isValidActionScope()
171 int c = Grammar.getCharValueFromGrammarCharLiteral(literal); in getTargetCharLiteralFromANTLRCharLiteral()
DCppTarget.java31 import org.antlr.tool.Grammar;
51 Grammar grammar, in genRecognizerFile()
66 Grammar grammar, in genRecognizerHeaderFile()
107 Grammar grammar, in chooseWhereCyclicDFAsGo()
122 case Grammar.LEXER: in isValidActionScope()
143 case Grammar.PARSER: in isValidActionScope()
164 case Grammar.COMBINED: in isValidActionScope()
188 case Grammar.TREE_PARSER: in isValidActionScope()
338 protected void performGrammarAnalysis(CodeGenerator generator, Grammar grammar) { in performGrammarAnalysis()

123456