|
reglibcpp
1.5.0
(Naïve) C++ implementation of models for regular languages
|
Private implementation details of GNFAs. More...
Public Member Functions | |
| pImpl () | |
| Constructs private implementation object for a GNFA accepting the empty language ∅. More... | |
| pImpl (unordered_map< string, unordered_map< string, expression::exptr >> &transitionMap, string const &initialState, forward_list< reference_wrapper< string const >> &acceptingStates) | |
| Constructs private implementation object with provided members. More... | |
| expression::exptr const & | getTransition (string const &qLabel, string const &pLabel) const |
| Safely fetches a transition RE between two states. More... | |
| void | addTransition (string const &qLabel, string const &pLabel, expression::exptr re, bool optimized=true, bool aggressive=false) |
| Safely adds a transition RE between two states. More... | |
| string const & | generateState (char prefix='q', char suffix='\0') |
| Generates a unique new state name with given prefix (and suffix). More... | |
Public Attributes | |
| unordered_map< string, unordered_map< string, expression::exptr > > | transitions |
| Holds the transition table viz state × state → regular expression. More... | |
| string | initial |
| Holds the name of the initial state. More... | |
| string | accepting |
| Holds the name of the accept state. More... | |
|
inline |
Constructs private implementation object for a GNFA accepting the empty language ∅.
Definition at line 30 of file gnfa.cpp.
|
inline |
Constructs private implementation object with provided members.
Definition at line 36 of file gnfa.cpp.
|
inline |
Safely adds a transition RE between two states.
The resulting transition will be labelled with the alternation of the provided RE and the former RE labelling the transition.
| qLabel | beginning of the transition |
| pLabel | end of the transition |
| re | the RE that should be added to the transition |
| optimized | pass-through to expression::spawnAlternation |
| aggressive | pass-through to expression::spawnAlternation |
Definition at line 74 of file gnfa.cpp.
|
inline |
Generates a unique new state name with given prefix (and suffix).
State name generation has two modes:
suffix == \0: The name begins with prefix and ends with an ever-increasing number.prefix and ends with an ever-expanding repetition of suffix. | prefix | printable char the new state's name should begin with |
| suffix | printable char the new state's name should end with or \0 for a number |
Definition at line 89 of file gnfa.cpp.
|
inline |
Safely fetches a transition RE between two states.
| qLabel | begin state of the transition |
| pLabel | end state of the transition |
Definition at line 54 of file gnfa.cpp.
| string reg::gnfa::pImpl::accepting |
| string reg::gnfa::pImpl::initial |
| unordered_map<string,unordered_map<string,expression::exptr> > reg::gnfa::pImpl::transitions |
1.8.14