JFlex
public final class NFA extends Object
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) |
String | dotFormat() |
void | dumpTable() |
DFA | getDFA()
Returns an DFA that accepts the same language as this NFA.
|
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() |
String | toString() |
void | writeDot(File file) |
See Also: checkLookAheads
Parameters: regExpNum the number of the regexp to add.
Parameters: regExp the regular expression to construct the NFA for
Returns: a pair of integers denoting the index of start and end state of the NFA.