|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectJFlex.DFA
public final class DFA
DFA representation in JFlex. Contains minimization algorithm.
| Field Summary | |
|---|---|
(package private) Action[] |
action
action[state] is the action that is to be carried out in
state state, null if there is no action. |
(package private) boolean[] |
isFinal
isFinal[state] == true <=> the state state is
a final state. |
(package private) boolean[] |
isLookEnd
isLookEnd[state] == true <=> the state state is
a final state of a lookahead expression. |
(package private) boolean[] |
isPushback
isPushback[state] == true <=> the state state is
a final state of an expression that can only be matched when followed by
a certain lookaead. |
(package private) int[] |
lexState
lexState[i] is the start-state of lexical state i |
static int |
NO_TARGET
The code for "no target state" in the transition table. |
(package private) int |
numInput
The current maximum number of input characters |
(package private) int |
numStates
The number of states in this DFA |
(package private) int[][] |
table
table[current_state][character] is the next state for current_state
with input character, NO_TARGET if there is no transition for
this input in current_state |
(package private) java.util.Hashtable |
usedActions
all actions that are used in this DFA |
| Constructor Summary | |
|---|---|
DFA(int numLexStates,
int numInp)
|
|
| Method Summary | |
|---|---|
void |
addTransition(int start,
char input,
int dest)
|
void |
checkActions(LexScan scanner,
LexParse parser)
|
java.lang.String |
dotFormat()
|
void |
minimize()
Implementation of Hopcroft's O(n log n) minimization algorithm, follows description by D. |
boolean[][] |
old_minimize()
|
void |
printBlocks(int[] b,
int[] b_f,
int[] b_b,
int last)
|
void |
printInvDelta(int[][] inv_delta,
int[] inv_delta_set)
|
void |
printL(int[] l_f,
int[] l_b,
int anchor)
|
void |
printTable(boolean[][] equiv)
|
void |
setAction(int state,
Action stateAction)
|
void |
setFinal(int state,
boolean isFinalState)
|
void |
setLexState(int lState,
int trueState)
|
void |
setPushback(int state,
boolean isPushbackState)
|
java.lang.String |
toString()
|
java.lang.String |
toString(int[] a)
|
void |
writeDot(java.io.File file)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int NO_TARGET
int[][] table
current_state
with input character, NO_TARGET if there is no transition for
this input in current_state
boolean[] isFinal
isFinal[state] == true <=> the state state is
a final state.
boolean[] isPushback
isPushback[state] == true <=> the state state is
a final state of an expression that can only be matched when followed by
a certain lookaead.
boolean[] isLookEnd
isLookEnd[state] == true <=> the state state is
a final state of a lookahead expression.
Action[] action
action[state] is the action that is to be carried out in
state state, null if there is no action.
int[] lexState
int numStates
int numInput
java.util.Hashtable usedActions
| Constructor Detail |
|---|
public DFA(int numLexStates,
int numInp)
| Method Detail |
|---|
public void setLexState(int lState,
int trueState)
public void setAction(int state,
Action stateAction)
public void setFinal(int state,
boolean isFinalState)
public void setPushback(int state,
boolean isPushbackState)
public void addTransition(int start,
char input,
int dest)
public java.lang.String toString()
toString in class java.lang.Objectpublic void writeDot(java.io.File file)
public java.lang.String dotFormat()
public void checkActions(LexScan scanner,
LexParse parser)
public void minimize()
public java.lang.String toString(int[] a)
public void printBlocks(int[] b,
int[] b_f,
int[] b_b,
int last)
public void printL(int[] l_f,
int[] l_b,
int anchor)
public boolean[][] old_minimize()
public void printInvDelta(int[][] inv_delta,
int[] inv_delta_set)
public void printTable(boolean[][] equiv)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||