com.inxar.syntacs.grammar.regular
Class RECharString

java.lang.Object
  |
  +--com.inxar.syntacs.grammar.regular.RECharString
All Implemented Interfaces:
CharString, Cloneable, RegularExpression

public class RECharString
extends Object
implements CharString

Standard CharString implementation.


Constructor Summary
RECharString(REGrammar grammar, String s)
          Constructs the RECharString on the given REGrammar and input String.
 
Method Summary
 Object clone()
          See the general explanation of clone() given above.
 void follow()
          Triggers the process of computing the follow sets.
 IntSet getFirstSet()
          Returns the IntSet of Intervals which are visible at the logical beginning of the the expression.
 RegularExpression getHead()
          Returns the RegularExpression at the head of the string.
 IntSet getLastSet()
          Returns the IntSet of Intervals which are visible at the logical end of the the expression.
 RegularExpression getTail()
          Returns the RegularExpression at the tail of the string.
 boolean isNullable()
          Returns true if this RegularExpression either *is* Epsilon or derives it.
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RECharString

public RECharString(REGrammar grammar,
                    String s)
Constructs the RECharString on the given REGrammar and input String.
Method Detail

isNullable

public boolean isNullable()
Description copied from interface: RegularExpression
Returns true if this RegularExpression either *is* Epsilon or derives it.
Specified by:
isNullable in interface RegularExpression

getFirstSet

public IntSet getFirstSet()
Description copied from interface: RegularExpression
Returns the IntSet of Intervals which are visible at the logical beginning of the the expression.
Specified by:
getFirstSet in interface RegularExpression

getLastSet

public IntSet getLastSet()
Description copied from interface: RegularExpression
Returns the IntSet of Intervals which are visible at the logical end of the the expression.
Specified by:
getLastSet in interface RegularExpression

follow

public void follow()
Description copied from interface: RegularExpression
Triggers the process of computing the follow sets.
Specified by:
follow in interface RegularExpression

getHead

public RegularExpression getHead()
Description copied from interface: CharString
Returns the RegularExpression at the head of the string. This is nearly always a Concatenation unless the CharString object is built on a single character string, like "a", in which case a concatenation would be impossible.
Specified by:
getHead in interface CharString

getTail

public RegularExpression getTail()
Description copied from interface: CharString
Returns the RegularExpression at the tail of the string. This is nearly always a Concatenation unless the CharString object is built on a single character string, like "a", in which case a concatenation would be impossible.
Specified by:
getTail in interface CharString

toString

public String toString()
Overrides:
toString in class Object

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