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.
ruleName
protected String ruleName
argAction
protected String argAction
throwsSpec
protected String throwsSpec
returnAction
protected String returnAction
endNode
protected antlr.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
autoGenType
protected int autoGenType
enclosingRuleName
protected 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
column
protected int column
RuleBlock
public RuleBlock(Grammar g,
String r)
- Construct a named rule.
RuleBlock
public RuleBlock(Grammar g,
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(String label)
generate
public void generate()
- Overrides:
generate
in class antlr.AlternativeBlock
getDefaultErrorHandler
public boolean getDefaultErrorHandler()
getEndElement
public antlr.RuleEndElement getEndElement()
getIgnoreRule
public String getIgnoreRule()
getRuleName
public String getRuleName()
getTestLiterals
public boolean getTestLiterals()
isLexerAutoGenRule
public boolean isLexerAutoGenRule()
look
public Lookahead look(int k)
- Overrides:
look
in class antlr.AlternativeBlock
prepareForAnalysis
public void prepareForAnalysis()
- Overrides:
prepareForAnalysis
in class antlr.AlternativeBlock
setDefaultErrorHandler
public void setDefaultErrorHandler(boolean value)
setEndElement
public void setEndElement(antlr.RuleEndElement re)
setOption
public void setOption(Token key,
Token value)
- Overrides:
setOption
in class antlr.AlternativeBlock
toString
public String toString()
- Overrides:
toString
in class antlr.AlternativeBlock
addAlternative
public void addAlternative(antlr.Alternative alt)
getAlternativeAt
public antlr.Alternative getAlternativeAt(int i)
getAlternatives
public Vector getAlternatives()
getAutoGen
public boolean getAutoGen()
getInitAction
public String getInitAction()
getLabel
public String getLabel()
- Overrides:
getLabel
in class antlr.AlternativeElement
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_)
- Overrides:
setLabel
in class antlr.AlternativeElement
getAutoGenType
public int getAutoGenType()
setAutoGenType
public void setAutoGenType(int a)
getLine
public int getLine()
getColumn
public int getColumn()
Copyright © 1999-2003 Oliver Zeigermann. All Rights Reserved.