Documentation ¶
Overview ¶
Package nfa implements Non-Deterministic Finite Automaton(NFA).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DFAStatesMap ¶
DFAStatesMap associates subsets of the NFA state set with the states of the DFA.
type NFA ¶
type NFA struct { I utils.State // initial state F mapset.Set // accept states Rules nfarule.RuleMap // transition function }
NFA represents a Non-Deterministic Finite Automaton.
func (*NFA) CalcDst ¶
CalcDst returns, according to the transition function, a set of states to which transition is executed when c is received in the state of argument q.
func (*NFA) SubsetConstruction ¶
subsetConstruction implements Subset Construction. Returns the data for constructing the equivalent DFA from the NFA given in the argument. For details: https://en.wikipedia.org/wiki/Powerset_construction
func (*NFA) ToWithoutEpsilon ¶
func (nfa *NFA) ToWithoutEpsilon()
ToWithoutEpsilon update ε-NFA to NFA whose no epsilon transitions.
Directories ¶
Path | Synopsis |
---|---|
Package nfabuilder implements some structures and functions to construct NFA.
|
Package nfabuilder implements some structures and functions to construct NFA. |
Package nfarule implements the transition function of NFA.
|
Package nfarule implements the transition function of NFA. |
Click to show internal directories.
Click to hide internal directories.