org.antlr.analysis
Class RuleClosureTransition

java.lang.Object
  extended by org.antlr.analysis.Transition
      extended by org.antlr.analysis.RuleClosureTransition
All Implemented Interfaces:
java.lang.Comparable

public class RuleClosureTransition
extends Transition

A transition used to reference another rule. It tracks two targets really: the actual transition target and the state following the state that refers to the other rule. Conversion of an NFA that falls off the end of a rule will be able to figure out who invoked that rule because of these special transitions.


Field Summary
protected  NFAState followState
          What node to begin computations following ref to rule
protected  int ruleIndex
          Index of rule targeted by this transition
 
Fields inherited from class org.antlr.analysis.Transition
label, target
 
Constructor Summary
RuleClosureTransition(int ruleIndex, NFAState ruleStart, NFAState followState)
           
 
Method Summary
 NFAState getFollowState()
           
 int getRuleIndex()
           
 
Methods inherited from class org.antlr.analysis.Transition
compareTo, equals, hashCode, isEpsilon, isSemanticPredicate, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ruleIndex

protected int ruleIndex
Index of rule targeted by this transition


followState

protected NFAState followState
What node to begin computations following ref to rule

Constructor Detail

RuleClosureTransition

public RuleClosureTransition(int ruleIndex,
                             NFAState ruleStart,
                             NFAState followState)
Method Detail

getFollowState

public NFAState getFollowState()

getRuleIndex

public int getRuleIndex()