public class Dfa extends DirectedGraph<DfaNode>
nodes, regex| Constructor and Description |
|---|
Dfa() |
| Modifier and Type | Method and Description |
|---|---|
protected DfaNode |
findNodeByClosure(Set<NfaNode> closure)
Locate a node in the dfa by examining each node's ε-closure
|
void |
generateFromNfa(Nfa graph)
Generate a DFA out of a NFA.
|
DfaNode |
getStart()
Get the starting node
|
protected boolean |
isClosureFinal(Set<NfaNode> closure)
Is a given ε-closure final? We know that a ε-closure is final if any
of the nfa nodes is an accept node
|
DfaNode |
newNode(Set<NfaNode> closure)
Create a dfa node with the given ε-closure.
|
getNode, getNodes, getRegex, layout, setRegex, toHtmlString, toString, Vpublic DfaNode newNode(Set<NfaNode> closure)
Node.eclosure() method.closure - is the closure coming from a NFAprotected DfaNode findNodeByClosure(Set<NfaNode> closure)
closure - is the ε-closure to be checked against all nodesprotected boolean isClosureFinal(Set<NfaNode> closure)
closure - is a ε-closure of nodes to checkpublic void generateFromNfa(Nfa graph)
graph - is the nfapublic DfaNode getStart()
Copyright © 2017. All rights reserved.