29 std::vector<std::reference_wrapper<std::string const>>
getActiveStates()
const;
32 std::vector<std::reference_wrapper<std::string const>>
splitTransition(std::string
const& qLabel, std::string
const& pLabel);
35 void ripState(std::string
const& qLabel);
41 std::unique_ptr<pImpl> p;
void ripState(std::string const &qLabel)
Removes a state, bypassing all its outgoing transitions.
std::vector< std::reference_wrapper< std::string const > > getActiveStates() const
Reveals the names of this GNFA's non-initial, non-accepting states.
expression::exptr getTransition(std::string const &qLabel, std::string const &pLabel) const
Extracts the RE labelling the transition between two states.
Represents nondeterministic finite automata with ε-moves.
gnfa(nfa const &n)
Constructs a GNFA with the same states and transitions as a given NFA.
nfa splitAllTransitions()
Splits all transitions until only ∅, ε, and symbol REs remain and builds the resulting NFA...
expression::exptr ripAllStates()
Removes all active states, constructing an RE semantically equivalent to this GNFA.
std::string const & getAcceptingState() const
Reveals the name of this GNFA's accept state.
Represents formal regular expressions.
std::string const & getInitialState() const
Reveals the name of this GNFA's initial state.
gnfa & operator=(gnfa const &n)
Copy-assigns this GNFA by copying another one's private implementation object.
std::vector< std::pair< std::string const &, std::string const & > > getSplittableTransitions() const
Reveals this GNFA's splittable transitions.
Contains the reg::expression class defintion.
Represents generalized nondeterministic finite automata.
std::vector< std::reference_wrapper< std::string const > > splitTransition(std::string const &qLabel, std::string const &pLabel)
Splits a transition between two states, adding new states if needed.
void bypassTransition(std::string const &qLabel, std::string const &pLabel)
Removes a transition between two states and replaces it with equivalent ones, bypassing its beginning...
std::shared_ptr< expression const > exptr
This is the type used to handle regular expressions.
Private implementation details of GNFAs.