T - final typepublic class DFA<T>
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
DFA.DFAState<T>
Represents a state in a DFA.
|
| Modifier and Type | Field and Description |
|---|---|
static int |
NOFINAL |
| Constructor and Description |
|---|
DFA(java.lang.Class<T> tokenClass,
DFA.DFAState<T> initial)
Constructs a new DFA with the specified initial state.
|
| Modifier and Type | Method and Description |
|---|---|
CompiledDFA<T> |
compile()
Compiles this DFA into a more efficient structure.
|
DFA<T> |
optimize()
Generates the minimal version of this DFA.
|
java.lang.String |
toString() |
public static final int NOFINAL
public DFA(java.lang.Class<T> tokenClass, DFA.DFAState<T> initial)
initial - initial statetokenClass - token classpublic CompiledDFA<T> compile()
public DFA<T> optimize()
public java.lang.String toString()
toString in class java.lang.Object