|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The RegularSet
interface is an optimized version of
the RegularGrammar
object generally used by
DFA
construction algorithms. By supplying a 'first
set' and acting as a repository for Interval
object
accessible by id, a DFA
can be constructed.
Method Summary | |
int |
getID()
Returns the globally allocated ID for this RegularSet . |
Interval |
getInterval(int id)
Returns the Interval by the given id. |
String |
getName()
Returns the name of this RegularSet . |
RegularGrammar |
getRegularGrammar()
Returns the parent RegularGrammar . |
IntSet |
getStart()
Returns the IntSet of intervals which are visible
from some abstract initial state. |
Token |
getToken(int id)
Returns the Token with the given id. |
int |
intervals()
Returns the number of Intervals used by the
grammar. |
int |
tokens()
Returns the number of tokens in the RegularSet . |
Method Detail |
public RegularGrammar getRegularGrammar()
RegularGrammar
.public int getID()
RegularSet
. This is useful for lexer construction
algorithms which use "start states" or multiple DFA's and
switch between them.public String getName()
RegularSet
. This is
generally relevant only when
PushdownRegularGrammars
are being created.public Interval getInterval(int id)
Interval
by the given id.public int intervals()
Intervals
used by the
grammar.public IntSet getStart()
IntSet
of intervals which are visible
from some abstract initial state. This is the first set over
the collection of tokens (each with its regular expression).
Therefore, this set represents the first state in a
DFA
.public Token getToken(int id)
Token
with the given id.public int tokens()
RegularSet
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |