com.inxar.syntacs.grammar.regular
Class REExpressionTerminator

java.lang.Object
  |
  +--com.inxar.syntacs.grammar.regular.REInterval
        |
        +--com.inxar.syntacs.grammar.regular.REExpressionTerminator
All Implemented Interfaces:
Cloneable, ExpressionTerminator, Interval, RegularExpression

public class REExpressionTerminator
extends REInterval
implements ExpressionTerminator

Standard ExpressionTerminator implementation.


Constructor Summary
REExpressionTerminator(REGrammar grammar, int id, RegularToken token)
          Constructs the REExpressionTerminator on the given REGrammar, allocated ID number, and the RegularToken to which this ExpressionTerminator corresponds.
 
Method Summary
 Object clone()
          See the general explanation of clone() given above.
 RegularToken getToken()
          Returns the Token which this ExpressionTerminator implies.
 boolean isTerminator()
          Returns the RTTI specifically to check if this Interval is an instanceof ExpressionTerminator.
 String toString()
           
 
Methods inherited from class com.inxar.syntacs.grammar.regular.REInterval
equals, follow, getFirstSet, getFollowSet, getID, getLastSet, hi, includes, isNullable, iterator, lo
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.inxar.syntacs.grammar.regular.Interval
getFollowSet, getID, hi, includes, iterator, lo
 
Methods inherited from interface org.inxar.syntacs.grammar.regular.RegularExpression
follow, getFirstSet, getLastSet, isNullable
 

Constructor Detail

REExpressionTerminator

public REExpressionTerminator(REGrammar grammar,
                              int id,
                              RegularToken token)
Constructs the REExpressionTerminator on the given REGrammar, allocated ID number, and the RegularToken to which this ExpressionTerminator corresponds.
Method Detail

toString

public String toString()
Overrides:
toString in class REInterval

isTerminator

public boolean isTerminator()
Description copied from interface: Interval
Returns the RTTI specifically to check if this Interval is an instanceof ExpressionTerminator. This method is used by some DFA algorithms to find final NFA states in a DFA state. It is faster than the instanceof operator.
Specified by:
isTerminator in interface Interval
Overrides:
isTerminator in class REInterval

getToken

public RegularToken getToken()
Description copied from interface: ExpressionTerminator
Returns the Token which this ExpressionTerminator implies.
Specified by:
getToken in interface ExpressionTerminator

clone

public Object clone()
             throws CloneNotSupportedException
Description copied from interface: RegularExpression
See the general explanation of clone() given above.
Specified by:
clone in interface RegularExpression
Overrides:
clone in class REInterval