antlr
Class RuleBlock

java.lang.Object
  extended byantlr.GrammarElement
      extended byantlr.AlternativeElement
          extended byantlr.AlternativeBlock
              extended byantlr.RuleBlock

public class RuleBlock
extends antlr.AlternativeBlock

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


Field Summary
static int AUTO_GEN_BANG
           
static int AUTO_GEN_CARET
           
static int AUTO_GEN_NONE
           
 
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
 
Method Summary
 void addAlternative(antlr.Alternative alt)
           
 void addExceptionSpec(antlr.ExceptionSpec ex)
           
 antlr.ExceptionSpec findExceptionSpec(java.lang.String label)
           
 antlr.ExceptionSpec findExceptionSpec(Token label)
           
 void generate()
           
 antlr.Alternative getAlternativeAt(int i)
           
 Vector getAlternatives()
           
 boolean getAutoGen()
           
 int getAutoGenType()
           
 int getColumn()
           
 boolean getDefaultErrorHandler()
           
 antlr.RuleEndElement getEndElement()
           
 java.lang.String getIgnoreRule()
           
 java.lang.String getInitAction()
           
 java.lang.String getLabel()
           
 int getLine()
           
 java.lang.String getRuleName()
           
 boolean getTestLiterals()
           
 boolean isLexerAutoGenRule()
           
 Lookahead look(int k)
           
 void prepareForAnalysis()
           
 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.
 void setAlternatives(Vector v)
           
 void setAutoGen(boolean doAutoGen_)
           
 void setAutoGenType(int a)
           
 void setDefaultErrorHandler(boolean value)
           
 void setEndElement(antlr.RuleEndElement re)
           
 void setInitAction(java.lang.String initAction_)
           
 void setLabel(java.lang.String label_)
           
 void setOption(Token key, Token value)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

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
Constructor Detail

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

Method Detail

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()