RuleBlock
antlr
Class RuleBlock
java.lang.Object
antlr.GrammarElement
antlr.AlternativeElement
antlr.AlternativeBlock
antlr.RuleBlock
- public class RuleBlock
- extends antlr.AlternativeBlock
A list of alternatives and info contained in
the rule definition.
|
Constructor Summary |
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 |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
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
RuleBlock
public RuleBlock(Grammar g,
java.lang.String r)
- Construct a named rule.
RuleBlock
public RuleBlock(Grammar g,
java.lang.String r,
int line,
boolean doAutoGen_)
- Construct a named rule with line number information
addExceptionSpec
public void addExceptionSpec(antlr.ExceptionSpec ex)
findExceptionSpec
public antlr.ExceptionSpec findExceptionSpec(Token label)
findExceptionSpec
public antlr.ExceptionSpec findExceptionSpec(java.lang.String label)
generate
public void generate()
getDefaultErrorHandler
public boolean getDefaultErrorHandler()
getEndElement
public antlr.RuleEndElement getEndElement()
getIgnoreRule
public java.lang.String getIgnoreRule()
getRuleName
public java.lang.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(antlr.RuleEndElement re)
setOption
public void setOption(Token key,
Token value)
toString
public java.lang.String toString()
addAlternative
public void addAlternative(antlr.Alternative alt)
getAlternativeAt
public antlr.Alternative getAlternativeAt(int i)
getAlternatives
public Vector getAlternatives()
getAutoGen
public boolean getAutoGen()
getInitAction
public java.lang.String getInitAction()
getLabel
public java.lang.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(java.lang.String initAction_)
setLabel
public void setLabel(java.lang.String label_)
getAutoGenType
public int getAutoGenType()
setAutoGenType
public void setAutoGenType(int a)
getLine
public int getLine()
getColumn
public int getColumn()