reglibcpp
1.3.0
(Naïve) C++ implementation of models for regular languages
|
Private implementation details of DFA builders. More...
Classes | |
struct | ValarrayBoolEqual |
Comparison object for valarray<bool> s, so they can be used as unordered_set keys. More... | |
struct | ValarrayBoolEqualTo |
Comparison object for valarray<bool> s against a specific instance. More... | |
struct | ValarrayBoolHasher |
Hasher object for valarray<bool> s, so they can be used as unordered_set keys. More... | |
Public Member Functions | |
pImpl ()=default | |
Constructs empty private implementation object. More... | |
pImpl (string &initial, unordered_set< char32_t > &alphabet, unordered_set< string > &acceptingStates, Dtransitionmap &transitions) | |
Constructs private implementation object with provided members. More... | |
bool | isTrashState (string const &q) const |
Tests whether all of a state's outgoing transitions point to itself. More... | |
string const & | generateNewState () |
Generates a uniquely named new state and adds it to the set of states. More... | |
void | complete () |
Totalizes a partial transition function by pointing any undefined transitions towards a trash state. More... | |
Static Public Member Functions | |
static bool | valarrayFullTrue (valarray< bool > const &a) |
Tests whether all of a valarray<bool> 's entries are true . More... | |
Public Attributes | |
string | initial |
Name of the prospective DFA's initial state. More... | |
unordered_set< char32_t > | alphabet |
Set of symbols processable by the prospective DFA. More... | |
unordered_set< string > | acceptingStates |
Set of names of the prospective DFA's accept states. More... | |
Dtransitionmap | transitions |
Transition function (state × symbol → state) of the prospective DFA. More... | |
|
default |
Constructs empty private implementation object.
|
inline |
Constructs private implementation object with provided members.
Definition at line 395 of file dfa.cpp.
|
inline |
Totalizes a partial transition function by pointing any undefined transitions towards a trash state.
If there is no state satisfying trashiness, a new one will be generated.
Definition at line 435 of file dfa.cpp.
|
inline |
Generates a uniquely named new state and adds it to the set of states.
Definition at line 421 of file dfa.cpp.
|
inline |
Tests whether all of a state's outgoing transitions point to itself.
Definition at line 406 of file dfa.cpp.
|
inlinestatic |
unordered_set<string> reg::dfa::builder::pImpl::acceptingStates |
unordered_set<char32_t> reg::dfa::builder::pImpl::alphabet |
string reg::dfa::builder::pImpl::initial |
Dtransitionmap reg::dfa::builder::pImpl::transitions |