18 #ifndef REG_FABUILDER_H 19 #define REG_FABUILDER_H 49 char32_t u32symbol = U
'\0');
67 char const* what_arg =
"Builder has nondeterministic characteristics.")
79 #endif // REG_FABUILDER_H fabuilder & operator=(fabuilder const &b)
Copy-assigns a builder by copying another one's private implementation object.
fabuilder & addSymbol(std::string const &symbol)
Adds a symbol to the prospective FA's alphabet.
Represents nondeterministic finite automata with ε-moves.
Represents deterministic finite automata.
fabuilder & intersect(nfa const &other)
Makes the prospective FA accept only words accepted also by another FA.
fabuilder & addTransition(std::string const &from, std::string const &to, std::string const &symbol="")
Adds a transition to the prospective FA's state transition function.
fabuilder & complete()
Totalizes a partial transition function by pointing any undefined transitions towards a trash state...
fabuilder & purge()
Purges the prospective FA of unreachable and non-producing states, possibly completing minimization...
Contains the reg::nfa class definition.
fabuilder & minimize(bool force=false)
Convenience method for chaining purge and merge to achieve proper DFA minimization.
dfa buildDfa(bool force=false)
Builds a DFA as defined by previous operations, including completion.
nondeterminism_exception(std::string const &what_arg)
fabuilder & addSymbol_(char32_t u32symbol)
Adds a symbol to the prospective FA's alphabet.
fabuilder & unite(nfa const &other)
Makes the prospective FA also accept every word of another FA's language.
fabuilder & normalizeStateNames(std::string const &prefix)
Reduces the prospective FA's state names to consecutive numbers, prefixed with a given string...
fabuilder & setAccepting(std::string const &state, bool accept)
Sets whether or not a state will be accepting within the prospective FA.
Signals that an operation requires full determinism and that no powerset construction was forced...
fabuilder()
Constructs a blank builder object.
Constructs NFAs step by step.
fabuilder & powerset()
Converts the builder's prospective NFA into a DFA via powerset construction.
fabuilder & merge(bool force=false)
Merges the prospective DFA's indistinguishable states, allowing for minimization. ...
Where this library lives.
fabuilder & makeInitial(std::string const &state)
Resets the initial state for the prospective FA.
nondeterminism_exception(char const *what_arg="Builder has nondeterministic characteristics.")
Constructs an exception object with the given message.
fabuilder & addTransition_(std::string const &from, std::string const &to, char32_t u32symbol=U'\0')
Adds a transition to the prospective FA's state transition function.
nfa buildNfa()
Builds an NFA as defined by previous operations.
Contains the reg::dfa class definition.
fabuilder & complement(bool force=false)
Inverts the prospective DFA's language with respect to all possible strings over its alphabet...