antlr
Class RuleBlock

java.lang.Object
  extended by antlr.GrammarElement
      extended by antlr.AlternativeElement
          extended by antlr.AlternativeBlock
              extended by antlr.RuleBlock

public class RuleBlock
extends AlternativeBlock

A list of alternatives and info contained in the rule definition.


Field Summary
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
           
 
Fields inherited from class antlr.AlternativeBlock
alternatives, alti, altj, analysisAlt, doAutoGen, generateAmbigWarnings, greedy, greedySet, hasAnAction, hasASynPred, ID, initAction, label, nblks, not, warnWhenFollowAmbig
 
Fields inherited from class antlr.AlternativeElement
autoGenType, enclosingRuleName, next
 
Fields inherited from class antlr.GrammarElement
AUTO_GEN_BANG, AUTO_GEN_CARET, AUTO_GEN_NONE, column, grammar, line
 
Constructor Summary
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
 
Method Summary
 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()
           
 
Methods inherited from class antlr.AlternativeBlock
addAlternative, getAlternativeAt, getAlternatives, getAutoGen, getInitAction, getLabel, removeTrackingOfRuleRefs, setAlternatives, setAutoGen, setInitAction, setLabel
 
Methods inherited from class antlr.AlternativeElement
getAutoGenType, setAutoGenType
 
Methods inherited from class antlr.GrammarElement
getColumn, getLine
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ruleName

protected String ruleName

argAction

protected String argAction

throwsSpec

protected String throwsSpec

returnAction

protected String returnAction

endNode

protected RuleEndElement endNode

testLiterals

protected boolean testLiterals

labeledElements

Vector labeledElements

lock

protected boolean[] lock

cache

protected Lookahead[] cache

exceptionSpecs

Hashtable exceptionSpecs

defaultErrorHandler

protected boolean defaultErrorHandler

ignoreRule

protected String ignoreRule
Constructor Detail

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

Method Detail

addExceptionSpec

public void addExceptionSpec(ExceptionSpec ex)

findExceptionSpec

public ExceptionSpec findExceptionSpec(Token label)

findExceptionSpec

public ExceptionSpec findExceptionSpec(String label)

generate

public void generate()
Overrides:
generate in class AlternativeBlock

getDefaultErrorHandler

public boolean getDefaultErrorHandler()

getEndElement

public 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 AlternativeBlock

prepareForAnalysis

public void prepareForAnalysis()
Overrides:
prepareForAnalysis in class AlternativeBlock

setDefaultErrorHandler

public void setDefaultErrorHandler(boolean value)

setEndElement

public void setEndElement(RuleEndElement re)

setOption

public void setOption(Token key,
                      Token value)
Overrides:
setOption in class AlternativeBlock

toString

public String toString()
Overrides:
toString in class AlternativeBlock