public class RuleBlock extends AlternativeBlock
Modifier and Type | Field and Description |
---|---|
protected String |
argAction |
protected Lookahead[] |
cache |
protected boolean |
defaultErrorHandler |
protected RuleEndElement |
endNode |
(package private) Hashtable |
exceptionSpecs |
protected String |
ignoreRule |
(package private) Vector |
labeledElements |
protected boolean[] |
lock |
protected String |
returnAction |
protected String |
ruleName |
protected boolean |
testLiterals |
protected String |
throwsSpec |
alternatives, alti, altj, analysisAlt, doAutoGen, generateAmbigWarnings, greedy, greedySet, hasAnAction, hasASynPred, ID, initAction, label, nblks, not, warnWhenFollowAmbig
autoGenType, enclosingRuleName, next
AUTO_GEN_BANG, AUTO_GEN_CARET, AUTO_GEN_NONE, column, grammar, line
Constructor and Description |
---|
RuleBlock(Grammar g,
String r)
Construct a named rule.
|
RuleBlock(Grammar g,
String r,
int line,
boolean doAutoGen_)
Construct a named rule with line number information
|
Modifier and Type | Method and Description |
---|---|
void |
addExceptionSpec(ExceptionSpec ex) |
ExceptionSpec |
findExceptionSpec(String label) |
ExceptionSpec |
findExceptionSpec(Token label) |
void |
generate() |
boolean |
getDefaultErrorHandler() |
RuleEndElement |
getEndElement() |
String |
getIgnoreRule() |
String |
getRuleName() |
boolean |
getTestLiterals() |
boolean |
isLexerAutoGenRule() |
Lookahead |
look(int k) |
void |
prepareForAnalysis() |
void |
setDefaultErrorHandler(boolean value) |
void |
setEndElement(RuleEndElement re) |
void |
setOption(Token key,
Token value) |
String |
toString() |
addAlternative, getAlternativeAt, getAlternatives, getAutoGen, getInitAction, getLabel, removeTrackingOfRuleRefs, setAlternatives, setAutoGen, setInitAction, setLabel
getAutoGenType, setAutoGenType
getColumn, getLine
protected String ruleName
protected String argAction
protected String throwsSpec
protected String returnAction
protected RuleEndElement endNode
protected boolean testLiterals
Vector labeledElements
protected boolean[] lock
protected Lookahead[] cache
Hashtable exceptionSpecs
protected boolean defaultErrorHandler
protected String ignoreRule
public void addExceptionSpec(ExceptionSpec ex)
public ExceptionSpec findExceptionSpec(Token label)
public ExceptionSpec findExceptionSpec(String label)
public void generate()
generate
in class AlternativeBlock
public boolean getDefaultErrorHandler()
public RuleEndElement getEndElement()
public String getIgnoreRule()
public String getRuleName()
public boolean getTestLiterals()
public boolean isLexerAutoGenRule()
public Lookahead look(int k)
look
in class AlternativeBlock
public void prepareForAnalysis()
prepareForAnalysis
in class AlternativeBlock
public void setDefaultErrorHandler(boolean value)
public void setEndElement(RuleEndElement re)
public void setOption(Token key, Token value)
setOption
in class AlternativeBlock
public String toString()
toString
in class AlternativeBlock