|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The Interval
interface abstracts a contiguous bounded
block of characters. Intervals
take the place of
normal input characters since it makes it easier to throw around
and otherwise manipulate large sets of characters. For example, if
we want to represent the ascii character charset, we chould use 256
individual char objects, or one Interval
object.
Method Summary | |
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 . |
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 |
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 . |
Methods inherited from interface org.inxar.syntacs.grammar.regular.RegularExpression |
clone, follow, getFirstSet, getLastSet, isNullable |
Method Detail |
public IntIterator iterator()
IntIterator
over the chars named by this
Interval
of characters.public boolean isTerminator()
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.public boolean includes(int c)
true
if the given char
(as an
int
) is within the bounds of this character set.public int lo()
char
in the Interval
.public int hi()
char
in the
Interval
.public int getID()
Interval
.public IntSet getFollowSet()
Intervals
(input)
that may occur directly after encountering this one.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |