55 requires isDFA < T > || isNFA < T >
62 requires isCompactDFA < T > || isCompactNFA < T >
67requires isCompactDFA < T > || isCompactNFA < T >
73requires isDFA < T > || isNFA < T >
83 std::stack<ext::tuple<StateType, StateType, SymbolType>>
stack;
84 for(
const auto& transition:
automaton.getTransitionsFromState(
automaton.getInitialState()))
98 decltype (
automaton.getTransitionsFromState (
q ) ) transitions;
100 while((transitions =
automaton.getTransitionsFromState(
q)).size() == 1 &&
automaton.getFinalStates().count(
q) == 0) {
101 const std::pair<ext::pair<StateType, SymbolType>,
StateType>& transition = * transitions.
begin();
102 path.push_back(transition.first.second);
103 q = transition.second;
114 res.addFinalState(
q);
116 res.addTransition ( std::move ( lastFork ), std::move ( path ), std::move (
q ) );
Compact deterministic finite automaton. Accepts regular languages. The automaton has a list of symbol...
Definition: CompactDFA.h:73
Compact nondeterministic finite automaton. Accepts regular languages. The automaton has a list of sym...
Definition: CompactNFA.h:78
Class extending the pair class from the standard library. Original reason is to allow printing of the...
Definition: pair.hpp:43
Class extending the vector class from the standard library. Original reason is to allow printing of t...
Definition: vector.hpp:45
auto begin() &
Inherited behavior of begin for non-const instance.
Definition: vector.hpp:125
typename T::SymbolType SymbolType
Definition: ReachableStates.h:176
q
Definition: SingleInitialStateEpsilonTransition.h:85
Definition: ToGrammar.h:31
ContainerType< ResType > transform(const ContainerType< InType, Ts ... > &in, Callback transform)
In container tranformation of all elements according to the tranform.
Definition: algorithm.hpp:150
constexpr auto make_tuple(Elements &&... args)
Helper of extended tuple construction. The tuple is constructed from values pack, types are deduced.
Definition: tuple.hpp:203