antlr
Class TreeElement
java.lang.Object
|
+--antlr.GrammarElement
|
+--antlr.AlternativeElement
|
+--antlr.AlternativeBlock
|
+--antlr.TreeElement
- class TreeElement
- extends AlternativeBlock
A TreeElement is a block with one alternative and a root node
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
root
GrammarAtom root
initAction
protected java.lang.String initAction
alternatives
protected Vector alternatives
label
protected java.lang.String 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
next
AlternativeElement next
autoGenType
protected int autoGenType
enclosingRuleName
protected java.lang.String enclosingRuleName
AUTO_GEN_NONE
public static final int AUTO_GEN_NONE
- See Also:
- Constant Field Values
AUTO_GEN_CARET
public static final int AUTO_GEN_CARET
- See Also:
- Constant Field Values
AUTO_GEN_BANG
public static final int AUTO_GEN_BANG
- See Also:
- Constant Field Values
grammar
protected Grammar grammar
line
protected int line
TreeElement
public TreeElement(Grammar g,
int line)
generate
public void generate()
- Overrides:
generate
in class AlternativeBlock
look
public Lookahead look(int k)
- Overrides:
look
in class AlternativeBlock
toString
public java.lang.String toString()
- Overrides:
toString
in class AlternativeBlock
addAlternative
public void addAlternative(Alternative alt)
getAlternativeAt
public Alternative getAlternativeAt(int i)
getAlternatives
public Vector getAlternatives()
getAutoGen
public boolean getAutoGen()
getInitAction
public java.lang.String getInitAction()
getLabel
public java.lang.String getLabel()
- Overrides:
getLabel
in class AlternativeElement
prepareForAnalysis
public void prepareForAnalysis()
removeTrackingOfRuleRefs
public void 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.
setAlternatives
public void setAlternatives(Vector v)
setAutoGen
public void setAutoGen(boolean doAutoGen_)
setInitAction
public void setInitAction(java.lang.String initAction_)
setLabel
public void setLabel(java.lang.String label_)
- Overrides:
setLabel
in class AlternativeElement
setOption
public void setOption(Token key,
Token value)
getAutoGenType
public int getAutoGenType()
getLine
public int getLine()