public class RuleBlock
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected persistence.antlr.collections.impl.Vector |
alternatives |
protected int |
alti |
protected int |
altj |
protected int |
analysisAlt |
protected java.lang.String |
argAction |
static int |
AUTO_GEN_BANG |
static int |
AUTO_GEN_CARET |
static int |
AUTO_GEN_NONE |
protected int |
autoGenType |
protected Lookahead[] |
cache |
protected int |
column |
protected boolean |
defaultErrorHandler |
protected boolean |
doAutoGen |
protected java.lang.String |
enclosingRuleName |
protected persistence.antlr.RuleEndElement |
endNode |
protected boolean |
generateAmbigWarnings |
protected Grammar |
grammar |
protected boolean |
hasAnAction |
protected boolean |
hasASynPred |
protected int |
ID |
protected java.lang.String |
ignoreRule |
protected java.lang.String |
initAction |
protected java.lang.String |
label |
protected int |
line |
protected boolean[] |
lock |
protected static int |
nblks |
protected java.lang.String |
returnAction |
protected java.lang.String |
ruleName |
protected boolean |
testLiterals |
protected java.lang.String |
throwsSpec |
protected boolean |
warnWhenFollowAmbig |
Constructor and Description |
---|
RuleBlock(Grammar g,
java.lang.String r)
Construct a named rule.
|
RuleBlock(Grammar g,
java.lang.String r,
int line,
boolean doAutoGen_)
Construct a named rule with line number information
|
Modifier and Type | Method and Description |
---|---|
void |
addAlternative(persistence.antlr.Alternative alt) |
void |
addExceptionSpec(persistence.antlr.ExceptionSpec ex) |
persistence.antlr.ExceptionSpec |
findExceptionSpec(java.lang.String label) |
persistence.antlr.ExceptionSpec |
findExceptionSpec(Token label) |
void |
generate() |
persistence.antlr.Alternative |
getAlternativeAt(int i) |
persistence.antlr.collections.impl.Vector |
getAlternatives() |
boolean |
getAutoGen() |
int |
getAutoGenType() |
int |
getColumn() |
boolean |
getDefaultErrorHandler() |
persistence.antlr.RuleEndElement |
getEndElement() |
java.lang.String |
getIgnoreRule() |
java.lang.String |
getInitAction() |
java.lang.String |
getLabel() |
int |
getLine() |
java.lang.String |
getRuleName() |
boolean |
getTestLiterals() |
boolean |
isLexerAutoGenRule() |
Lookahead |
look(int k) |
void |
prepareForAnalysis() |
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.
|
void |
setAlternatives(persistence.antlr.collections.impl.Vector v) |
void |
setAutoGen(boolean doAutoGen_) |
void |
setAutoGenType(int a) |
void |
setDefaultErrorHandler(boolean value) |
void |
setEndElement(persistence.antlr.RuleEndElement re) |
void |
setInitAction(java.lang.String initAction_) |
void |
setLabel(java.lang.String label_) |
void |
setOption(Token key,
Token value) |
java.lang.String |
toString() |
protected java.lang.String ruleName
protected java.lang.String argAction
protected java.lang.String throwsSpec
protected java.lang.String returnAction
protected persistence.antlr.RuleEndElement endNode
protected boolean testLiterals
protected boolean[] lock
protected Lookahead[] cache
protected boolean defaultErrorHandler
protected java.lang.String ignoreRule
protected java.lang.String initAction
protected persistence.antlr.collections.impl.Vector alternatives
protected java.lang.String label
protected int alti
protected int altj
protected int analysisAlt
protected boolean hasAnAction
protected boolean hasASynPred
protected int ID
protected static int nblks
protected boolean doAutoGen
protected boolean warnWhenFollowAmbig
protected boolean generateAmbigWarnings
protected int autoGenType
protected java.lang.String enclosingRuleName
public static final int AUTO_GEN_NONE
public static final int AUTO_GEN_CARET
public static final int AUTO_GEN_BANG
protected Grammar grammar
protected int line
protected int column
public RuleBlock(Grammar g, java.lang.String r)
public RuleBlock(Grammar g, java.lang.String r, int line, boolean doAutoGen_)
public void addExceptionSpec(persistence.antlr.ExceptionSpec ex)
public persistence.antlr.ExceptionSpec findExceptionSpec(Token label)
public persistence.antlr.ExceptionSpec findExceptionSpec(java.lang.String label)
public void generate()
public boolean getDefaultErrorHandler()
public persistence.antlr.RuleEndElement getEndElement()
public java.lang.String getIgnoreRule()
public java.lang.String getRuleName()
public boolean getTestLiterals()
public boolean isLexerAutoGenRule()
public Lookahead look(int k)
public void prepareForAnalysis()
public void setDefaultErrorHandler(boolean value)
public void setEndElement(persistence.antlr.RuleEndElement re)
public java.lang.String toString()
public void addAlternative(persistence.antlr.Alternative alt)
public persistence.antlr.Alternative getAlternativeAt(int i)
public persistence.antlr.collections.impl.Vector getAlternatives()
public boolean getAutoGen()
public java.lang.String getInitAction()
public java.lang.String getLabel()
public void removeTrackingOfRuleRefs(Grammar g)
public void setAlternatives(persistence.antlr.collections.impl.Vector v)
public void setAutoGen(boolean doAutoGen_)
public void setInitAction(java.lang.String initAction_)
public void setLabel(java.lang.String label_)
public int getAutoGenType()
public void setAutoGenType(int a)
public int getLine()
public int getColumn()