|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectJFlex.NFA
public final class NFA
NFA representation in JFlex. Contains algorithms RegExp -> NFA and NFA -> DFA.
Constructor Summary | |
---|---|
NFA(int numInput,
int estSize)
|
|
NFA(int numInput,
LexScan scanner,
RegExps regExps,
Macros macros,
CharClasses classes)
Construct new NFA. |
Method Summary | |
---|---|
void |
addEpsilonTransition(int start,
int dest)
|
void |
addRegExp(int regExpNum)
Add a regexp to this NFA. |
void |
addStandaloneRule()
Add a standalone rule that has minimum priority, fires a transition on all single input characters and has a "print yytext" action. |
void |
addTransition(int start,
int input,
int dest)
|
java.lang.String |
dotFormat()
|
void |
dumpTable()
|
DFA |
getDFA()
Returns an DFA that accepts the same language as this NFA. |
JFlex.IntPair |
insertNFA(RegExp regExp)
Constructs an NFA for regExp such that the NFA has exactly one start state, exactly one end state, no transitions leading out of the end state no transitions leading into the start state |
int |
numEntryStates()
|
java.lang.String |
toString()
|
void |
writeDot(java.io.File file)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public NFA(int numInput, int estSize)
public NFA(int numInput, LexScan scanner, RegExps regExps, Macros macros, CharClasses classes)
RegExps.checkLookAheads()
Method Detail |
---|
public int numEntryStates()
public void addStandaloneRule()
public void addRegExp(int regExpNum)
regExpNum
- the number of the regexp to add.public void addTransition(int start, int input, int dest)
public void addEpsilonTransition(int start, int dest)
public DFA getDFA()
public void dumpTable()
public java.lang.String toString()
toString
in class java.lang.Object
public void writeDot(java.io.File file)
public java.lang.String dotFormat()
public JFlex.IntPair insertNFA(RegExp regExp)
regExp
- the regular expression to construct the
NFA for
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |