|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.inxar.syntacs.grammar.regular.REInterval
Standard Interval
implementation.
Constructor Summary | |
REInterval(REGrammar grammar,
int ID,
int lo,
int hi)
Constructs the REInterval on the given
REGrammar , lo and hi interval points, and the
assigned ID number. |
Method Summary | |
Object |
clone()
See the general explanation of clone() given above. |
boolean |
equals(Object other)
|
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. |
IntSet |
getFollowSet()
Returns the "follow set", or the Intervals (input)
that may occur directly after encountering this one. |
int |
getID()
Returns the globally allocated ID for this Interval . |
IntSet |
getLastSet()
Returns the IntSet of Intervals which
are visible at the logical end of the the expression. |
int |
hi()
Returns the high char in the
Interval . |
boolean |
includes(int c)
Returns true if the given char (as an
int ) is within the bounds of this character set. |
boolean |
isNullable()
Returns true if this
RegularExpression either *is* Epsilon
or derives it. |
boolean |
isTerminator()
Returns the RTTI specifically to check if this Interval is an instanceof
ExpressionTerminator . |
IntIterator |
iterator()
Returns an IntIterator over the chars named by this
Interval of characters. |
int |
lo()
Returns the low char in the Interval . |
String |
toString()
|
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public REInterval(REGrammar grammar, int ID, int lo, int hi)
REInterval
on the given
REGrammar
, lo and hi interval points, and the
assigned ID number.Method Detail |
public boolean isNullable()
RegularExpression
true
if this
RegularExpression
either *is* Epsilon
or derives it.isNullable
in interface RegularExpression
public IntSet getFirstSet()
RegularExpression
IntSet
of Intervals
which
are visible at the logical beginning of the the expression.getFirstSet
in interface RegularExpression
public IntSet getLastSet()
RegularExpression
IntSet
of Intervals
which
are visible at the logical end of the the expression.getLastSet
in interface RegularExpression
public IntSet getFollowSet()
Interval
Intervals
(input)
that may occur directly after encountering this one.getFollowSet
in interface Interval
public void follow()
RegularExpression
follow
in interface RegularExpression
public IntIterator iterator()
Interval
IntIterator
over the chars named by this
Interval
of characters.iterator
in interface Interval
public boolean isTerminator()
Interval
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.isTerminator
in interface Interval
public boolean equals(Object other)
equals
in class Object
public Object clone() throws CloneNotSupportedException
RegularExpression
clone()
given above.clone
in interface RegularExpression
public String toString()
toString
in class Object
public boolean includes(int c)
Interval
true
if the given char
(as an
int
) is within the bounds of this character set.includes
in interface Interval
public int lo()
Interval
char
in the Interval
.lo
in interface Interval
public int hi()
Interval
char
in the
Interval
.hi
in interface Interval
public int getID()
Interval
Interval
.getID
in interface Interval
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |