at.dms.compiler.tools.antlr.compiler
Class RuleBlock
java.lang.Object
at.dms.compiler.tools.antlr.compiler.RuleBlock
public class RuleBlock
- extends Object
A list of alternatives and info contained in
the rule definition.
ruleName
protected String ruleName
argAction
protected String argAction
throwsSpec
protected String throwsSpec
returnAction
protected String returnAction
endNode
protected at.dms.compiler.tools.antlr.compiler.RuleEndElement endNode
testLiterals
protected boolean testLiterals
lock
protected boolean[] lock
cache
protected Lookahead[] cache
defaultErrorHandler
protected boolean defaultErrorHandler
ignoreRule
protected String ignoreRule
initAction
protected String initAction
alternatives
protected Vector alternatives
label
protected 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
doAutoGen
protected boolean doAutoGen
warnWhenFollowAmbig
protected boolean warnWhenFollowAmbig
generateAmbigWarnings
protected boolean generateAmbigWarnings
enclosingRuleName
protected String enclosingRuleName
grammar
protected Grammar grammar
line
protected int line
RuleBlock
public RuleBlock(Grammar g,
String r)
- Construct a named rule.
RuleBlock
public RuleBlock(Grammar g,
String r,
int line)
- Construct a named rule with line number information
addExceptionSpec
public void addExceptionSpec(at.dms.compiler.tools.antlr.compiler.ExceptionSpec ex)
findExceptionSpec
public at.dms.compiler.tools.antlr.compiler.ExceptionSpec findExceptionSpec(Token label)
findExceptionSpec
public at.dms.compiler.tools.antlr.compiler.ExceptionSpec findExceptionSpec(String label)
generate
public void generate(JavaCodeGenerator generator)
getDefaultErrorHandler
public boolean getDefaultErrorHandler()
getEndElement
public at.dms.compiler.tools.antlr.compiler.RuleEndElement getEndElement()
getIgnoreRule
public String getIgnoreRule()
getRuleName
public String getRuleName()
getTestLiterals
public boolean getTestLiterals()
isLexerAutoGenRule
public boolean isLexerAutoGenRule()
look
public Lookahead look(int k)
prepareForAnalysis
public void prepareForAnalysis()
setDefaultErrorHandler
public void setDefaultErrorHandler(boolean value)
setEndElement
public void setEndElement(at.dms.compiler.tools.antlr.compiler.RuleEndElement re)
setOption
public void setOption(Token key,
Token value)
toString
public String toString()
addAlternative
public void addAlternative(at.dms.compiler.tools.antlr.compiler.Alternative alt)
getAlternativeAt
public at.dms.compiler.tools.antlr.compiler.Alternative getAlternativeAt(int i)
getAlternatives
public Vector getAlternatives()
getAutoGen
public boolean getAutoGen()
getInitAction
public String getInitAction()
getLabel
public String getLabel()
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(String initAction_)
setLabel
public void setLabel(String label_)
getLine
public int getLine()