Public Member Functions | |
AlternativeBlock (Grammar g) | |
AlternativeBlock (Grammar g, Token start, boolean not) | |
void | addAlternative (Alternative alt) |
void | generate () |
Alternative | getAlternativeAt (int i) |
Vector | getAlternatives () |
boolean | getAutoGen () |
String | getInitAction () |
String | getLabel () |
Lookahead | look (int k) |
void | prepareForAnalysis () |
void | removeTrackingOfRuleRefs (Grammar g) |
void | setAlternatives (Vector v) |
void | setAutoGen (boolean doAutoGen_) |
void | setInitAction (String initAction_) |
void | setLabel (String label_) |
void | setOption (Token key, Token value) |
String | toString () |
Protected Attributes | |
String | initAction = null |
Vector | alternatives |
String | label |
int | alti |
int | altj |
int | analysisAlt |
boolean | hasAnAction = false |
boolean | hasASynPred = false |
int | ID = 0 |
boolean | doAutoGen = true |
boolean | warnWhenFollowAmbig = true |
boolean | generateAmbigWarnings = true |
Static Protected Attributes | |
static int | nblks |
Package Attributes | |
boolean | not = false |
boolean | greedy = true |
boolean | greedySet = false |
A list of alternatives
antlr.AlternativeBlock.AlternativeBlock | ( | Grammar | g | ) |
void antlr.AlternativeBlock.addAlternative | ( | Alternative | alt | ) |
void antlr.AlternativeBlock.generate | ( | ) |
Reimplemented from antlr.GrammarElement.
Reimplemented in antlr.OneOrMoreBlock, antlr.RuleBlock, antlr.SynPredBlock, antlr.TreeElement, and antlr.ZeroOrMoreBlock.
References antlr.CodeGenerator.gen(), antlr.Grammar.generator, and antlr.GrammarElement.grammar.
Alternative antlr.AlternativeBlock.getAlternativeAt | ( | int | i | ) |
References antlr.AlternativeBlock.alternatives, and antlr.collections.impl.Vector.elementAt().
Referenced by antlr.LLkAnalyzer.deterministic(), antlr.LLkAnalyzer.deterministicImpliedPath(), antlr.PythonCodeGenerator.gen(), antlr.JavaCodeGenerator.gen(), antlr.CSharpCodeGenerator.gen(), antlr.CppCodeGenerator.gen(), antlr.PythonCodeGenerator.genCommonBlock(), antlr.JavaCodeGenerator.genCommonBlock(), antlr.HTMLCodeGenerator.genCommonBlock(), antlr.DocBookCodeGenerator.genCommonBlock(), antlr.DiagnosticCodeGenerator.genCommonBlock(), antlr.CSharpCodeGenerator.genCommonBlock(), antlr.CppCodeGenerator.genCommonBlock(), antlr.HTMLCodeGenerator.genLookaheadSetForBlock(), antlr.DocBookCodeGenerator.genLookaheadSetForBlock(), antlr.DiagnosticCodeGenerator.genLookaheadSetForBlock(), antlr.PythonCodeGenerator.genNextToken(), antlr.JavaCodeGenerator.genNextToken(), antlr.CSharpCodeGenerator.genNextToken(), antlr.CppCodeGenerator.genNextToken(), antlr.PythonCodeGenerator.genRule(), antlr.JavaCodeGenerator.genRule(), antlr.CSharpCodeGenerator.genRule(), antlr.CppCodeGenerator.genRule(), antlr.LLkAnalyzer.look(), antlr.AlternativeBlock.removeTrackingOfRuleRefs(), antlr.LLkAnalyzer.subruleCanBeInverted(), antlr.AlternativeBlock.toString(), and antlr.DefaultToolErrorHandler.warnAltAmbiguity().
Vector antlr.AlternativeBlock.getAlternatives | ( | ) |
References antlr.AlternativeBlock.alternatives.
Referenced by antlr.MakeGrammar.createNextTokenRule(), antlr.LLkAnalyzer.deterministicImpliedPath(), antlr.PythonCodeGenerator.gen(), antlr.JavaCodeGenerator.gen(), antlr.CSharpCodeGenerator.gen(), antlr.CppCodeGenerator.gen(), antlr.PythonCodeGenerator.genCommonBlock(), antlr.JavaCodeGenerator.genCommonBlock(), antlr.CSharpCodeGenerator.genCommonBlock(), antlr.CppCodeGenerator.genCommonBlock(), antlr.PythonCodeGenerator.genNextToken(), antlr.JavaCodeGenerator.genNextToken(), antlr.CSharpCodeGenerator.genNextToken(), antlr.CppCodeGenerator.genNextToken(), and antlr.MakeGrammar.setBlock().
boolean antlr.AlternativeBlock.getAutoGen | ( | ) |
References antlr.AlternativeBlock.doAutoGen.
Referenced by antlr.PythonCodeGenerator.genCommonBlock(), antlr.JavaCodeGenerator.genCommonBlock(), antlr.CSharpCodeGenerator.genCommonBlock(), antlr.CppCodeGenerator.genCommonBlock(), antlr.PythonCodeGenerator.genRule(), antlr.JavaCodeGenerator.genRule(), antlr.CSharpCodeGenerator.genRule(), antlr.CppCodeGenerator.genRule(), and antlr.CppCodeGenerator.genRuleHeader().
String antlr.AlternativeBlock.getInitAction | ( | ) |
References antlr.AlternativeBlock.initAction.
String antlr.AlternativeBlock.getLabel | ( | ) |
Reimplemented from antlr.AlternativeElement.
References antlr.AlternativeBlock.label.
Referenced by antlr.PythonCodeGenerator.gen(), antlr.JavaCodeGenerator.gen(), antlr.CSharpCodeGenerator.gen(), antlr.CppCodeGenerator.gen(), antlr.PythonCodeGenerator.genAlt(), antlr.JavaCodeGenerator.genAlt(), antlr.CSharpCodeGenerator.genAlt(), antlr.CppCodeGenerator.genAlt(), antlr.PythonCodeGenerator.genBlockPreamble(), antlr.JavaCodeGenerator.genBlockPreamble(), antlr.CSharpCodeGenerator.genBlockPreamble(), antlr.CppCodeGenerator.genBlockPreamble(), antlr.PythonCodeGenerator.genCommonBlock(), antlr.JavaCodeGenerator.genCommonBlock(), antlr.CSharpCodeGenerator.genCommonBlock(), and antlr.CppCodeGenerator.genCommonBlock().
Lookahead antlr.AlternativeBlock.look | ( | int | k | ) |
Reimplemented from antlr.GrammarElement.
Reimplemented in antlr.OneOrMoreBlock, antlr.RuleBlock, antlr.SynPredBlock, antlr.TreeElement, and antlr.ZeroOrMoreBlock.
References antlr.GrammarElement.grammar, antlr.LLkGrammarAnalyzer.look(), and antlr.Grammar.theLLkAnalyzer.
void antlr.AlternativeBlock.prepareForAnalysis | ( | ) |
Reimplemented in antlr.RuleBlock.
References antlr.AlternativeBlock.alternatives, antlr.Alternative.cache, antlr.collections.impl.Vector.elementAt(), antlr.GrammarElement.grammar, antlr.Alternative.lookaheadDepth, antlr.Grammar.maxk, and antlr.collections.impl.Vector.size().
Referenced by antlr.MakeGrammar.endRule(), and antlr.MakeGrammar.endSubRule().
void antlr.AlternativeBlock.removeTrackingOfRuleRefs | ( | Grammar | g | ) |
Walk the syntactic predicate and, for a rule ref R, remove the ref from the list of FOLLOW references for R (stored in the symbol table.
References antlr.AlternativeBlock.alternatives, antlr.Grammar.antlrTool, antlr.Tool.error(), antlr.AlternativeBlock.getAlternativeAt(), antlr.Grammar.getSymbol(), antlr.GrammarElement.grammar, antlr.Alternative.head, antlr.AlternativeElement.next, antlr.RuleSymbol.references, antlr.collections.impl.Vector.removeElement(), antlr.collections.impl.Vector.size(), and antlr.RuleRefElement.targetRule.
Referenced by antlr.MakeGrammar.endSubRule().
void antlr.AlternativeBlock.setAlternatives | ( | Vector | v | ) |
References antlr.AlternativeBlock.alternatives.
Referenced by antlr.MakeGrammar.setBlock().
void antlr.AlternativeBlock.setAutoGen | ( | boolean | doAutoGen_ | ) |
References antlr.AlternativeBlock.doAutoGen.
Referenced by antlr.MakeGrammar.createNextTokenRule(), antlr.MakeGrammar.noAutoGenSubRule(), and antlr.RuleBlock.RuleBlock().
void antlr.AlternativeBlock.setInitAction | ( | String | initAction_ | ) |
References antlr.AlternativeBlock.initAction.
Referenced by antlr.MakeGrammar.refInitAction().
void antlr.AlternativeBlock.setLabel | ( | String | label_ | ) |
Reimplemented from antlr.AlternativeElement.
References antlr.AlternativeBlock.label.
Reimplemented in antlr.RuleBlock.
References antlr.Grammar.antlrTool, antlr.Tool.error(), antlr.AlternativeBlock.generateAmbigWarnings, antlr.Token.getColumn(), antlr.Grammar.getFilename(), antlr.Token.getLine(), antlr.Token.getText(), antlr.GrammarElement.grammar, antlr.AlternativeBlock.greedy, antlr.AlternativeBlock.greedySet, and antlr.AlternativeBlock.warnWhenFollowAmbig.
String antlr.AlternativeBlock.toString | ( | ) | [virtual] |
Implements antlr.GrammarElement.
Reimplemented in antlr.OneOrMoreBlock, antlr.RuleBlock, antlr.SynPredBlock, antlr.TreeElement, and antlr.ZeroOrMoreBlock.
References antlr.AlternativeBlock.alternatives, antlr.Alternative.cache, antlr.AlternativeBlock.getAlternativeAt(), antlr.TokenManager.getVocabulary(), antlr.GrammarElement.grammar, antlr.Alternative.head, antlr.AlternativeBlock.initAction, antlr.Alternative.lookaheadDepth, antlr.AlternativeElement.next, antlr.Alternative.semPred, antlr.collections.impl.Vector.size(), antlr.Grammar.tokenManager, and antlr.Lookahead.toString().
Vector antlr.AlternativeBlock.alternatives [protected] |
Referenced by antlr.AlternativeBlock.addAlternative(), antlr.AlternativeBlock.AlternativeBlock(), antlr.BlockContext.currentAlt(), antlr.LLkAnalyzer.deterministic(), antlr.PythonCodeGenerator.genCommonBlock(), antlr.JavaCodeGenerator.genCommonBlock(), antlr.HTMLCodeGenerator.genCommonBlock(), antlr.DocBookCodeGenerator.genCommonBlock(), antlr.DiagnosticCodeGenerator.genCommonBlock(), antlr.CSharpCodeGenerator.genCommonBlock(), antlr.CppCodeGenerator.genCommonBlock(), antlr.HTMLCodeGenerator.genGenericBlock(), antlr.DocBookCodeGenerator.genGenericBlock(), antlr.HTMLCodeGenerator.genLookaheadSetForBlock(), antlr.DocBookCodeGenerator.genLookaheadSetForBlock(), antlr.DiagnosticCodeGenerator.genLookaheadSetForBlock(), antlr.PythonCodeGenerator.genRule(), antlr.JavaCodeGenerator.genRule(), antlr.CSharpCodeGenerator.genRule(), antlr.CppCodeGenerator.genRule(), antlr.AlternativeBlock.getAlternativeAt(), antlr.AlternativeBlock.getAlternatives(), antlr.LLkAnalyzer.look(), antlr.AlternativeBlock.prepareForAnalysis(), antlr.AlternativeBlock.removeTrackingOfRuleRefs(), antlr.AlternativeBlock.setAlternatives(), antlr.LLkAnalyzer.subruleCanBeInverted(), antlr.TreeElement.toString(), and antlr.AlternativeBlock.toString().
int antlr.AlternativeBlock.alti [protected] |
Referenced by antlr.LLkAnalyzer.deterministic(), and antlr.LLkAnalyzer.deterministicImpliedPath().
int antlr.AlternativeBlock.altj [protected] |
Referenced by antlr.LLkAnalyzer.deterministic(), and antlr.LLkAnalyzer.deterministicImpliedPath().
int antlr.AlternativeBlock.analysisAlt [protected] |
Referenced by antlr.LLkAnalyzer.deterministic(), and antlr.LLkAnalyzer.look().
boolean antlr.AlternativeBlock.doAutoGen = true [protected] |
Referenced by antlr.AlternativeBlock.getAutoGen(), and antlr.AlternativeBlock.setAutoGen().
boolean antlr.AlternativeBlock.generateAmbigWarnings = true [protected] |
boolean antlr.AlternativeBlock.greedy = true [package] |
boolean antlr.AlternativeBlock.greedySet = false [package] |
boolean antlr.AlternativeBlock.hasAnAction = false [protected] |
Referenced by antlr.MakeGrammar.refAction(), and antlr.MakeGrammar.setBlock().
boolean antlr.AlternativeBlock.hasASynPred = false [protected] |
Referenced by antlr.MakeGrammar.endSubRule(), and antlr.MakeGrammar.setBlock().
int antlr.AlternativeBlock.ID = 0 [protected] |
Referenced by antlr.AlternativeBlock.AlternativeBlock(), antlr.PythonCodeGenerator.gen(), antlr.JavaCodeGenerator.gen(), antlr.CSharpCodeGenerator.gen(), antlr.CppCodeGenerator.gen(), antlr.PythonCodeGenerator.genSynPred(), antlr.JavaCodeGenerator.genSynPred(), antlr.CSharpCodeGenerator.genSynPred(), and antlr.CppCodeGenerator.genSynPred().
String antlr.AlternativeBlock.initAction = null [protected] |
Referenced by antlr.PythonCodeGenerator.genBlockInitAction(), antlr.JavaCodeGenerator.genBlockInitAction(), antlr.CSharpCodeGenerator.genBlockInitAction(), antlr.CppCodeGenerator.genBlockInitAction(), antlr.DiagnosticCodeGenerator.genBlockPreamble(), antlr.AlternativeBlock.getInitAction(), antlr.MakeGrammar.setBlock(), antlr.AlternativeBlock.setInitAction(), and antlr.AlternativeBlock.toString().
String antlr.AlternativeBlock.label [protected] |
int antlr.AlternativeBlock.nblks [static, protected] |
Referenced by antlr.AlternativeBlock.AlternativeBlock().
boolean antlr.AlternativeBlock.not = false [package] |
boolean antlr.AlternativeBlock.warnWhenFollowAmbig = true [protected] |