public class DFA extends NFA
acceptStates, nt, startStates
Constructor and Description |
---|
DFA(NFA nfa)
Build a deterministic finite automaton from an existing, potentially nondeterministic one.
|
DFA(Nonterminal nonterminal)
Build a deterministic finite automaton that accepts the given nonterminal from a grammar
|
Modifier and Type | Method and Description |
---|---|
boolean |
accepts(int state) |
String |
dumpTable()
Dump the transition table to a string.
|
boolean |
parse(int... terminals)
Return true if this DFA (and the nonterminal it is built from) match the given sequence of
terminal symbols.
|
int |
transition(int initState,
int terminal)
this method will not catch reject states; the caller must do so.
|
minimize, relabelNodes, reverse, toDFA, toGraphViz
public DFA(NFA nfa)
public DFA(Nonterminal nonterminal)
public String dumpTable()
public boolean parse(int... terminals)
public int transition(int initState, int terminal)
public boolean accepts(int state)
Copyright © 2015. All rights reserved.