Package antlr
Class AlternativeBlock
java.lang.Object
antlr.GrammarElement
antlr.AlternativeElement
antlr.AlternativeBlock
- Direct Known Subclasses:
BlockWithImpliedExitPath,RuleBlock,SynPredBlock,TreeElement
A list of alternatives
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Vectorprotected intprotected intprotected intprotected booleanprotected boolean(package private) boolean(package private) booleanprotected booleanprotected booleanprotected intprotected Stringprotected Stringprotected static int(package private) booleanprotected booleanFields inherited from class antlr.AlternativeElement
autoGenType, enclosingRuleName, nextFields inherited from class antlr.GrammarElement
AUTO_GEN_BANG, AUTO_GEN_CARET, AUTO_GEN_NONE, column, grammar, line -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidgenerate()getAlternativeAt(int i) booleangetLabel()look(int k) voidvoidWalk 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.voidvoidsetAutoGen(boolean doAutoGen_) voidsetInitAction(String initAction_) voidvoidtoString()Methods inherited from class antlr.AlternativeElement
getAutoGenType, setAutoGenTypeMethods inherited from class antlr.GrammarElement
getColumn, getLine
-
Field Details
-
initAction
-
alternatives
-
label
-
alti
protected int alti -
altj
protected int altj -
analysisAlt
protected int analysisAlt -
hasAnAction
protected boolean hasAnAction -
hasASynPred
protected boolean hasASynPred -
ID
protected int ID -
nblks
protected static int nblks -
not
boolean not -
greedy
boolean greedy -
greedySet
boolean greedySet -
doAutoGen
protected boolean doAutoGen -
warnWhenFollowAmbig
protected boolean warnWhenFollowAmbig -
generateAmbigWarnings
protected boolean generateAmbigWarnings
-
-
Constructor Details
-
AlternativeBlock
-
AlternativeBlock
-
-
Method Details
-
addAlternative
-
generate
public void generate()- Overrides:
generatein classGrammarElement
-
getAlternativeAt
-
getAlternatives
-
getAutoGen
public boolean getAutoGen() -
getInitAction
-
getLabel
- Overrides:
getLabelin classAlternativeElement
-
look
- Overrides:
lookin classGrammarElement
-
prepareForAnalysis
public void prepareForAnalysis() -
removeTrackingOfRuleRefs
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. -
setAlternatives
-
setAutoGen
public void setAutoGen(boolean doAutoGen_) -
setInitAction
-
setLabel
- Overrides:
setLabelin classAlternativeElement
-
setOption
-
toString
- Specified by:
toStringin classGrammarElement
-