17template<
class SymbolType,
class StateType >
27template<
class SymbolType,
class StateType >
44 symbols.push_back(symbol);
63 parseTransition(input, states, symbols, initialState, finalStates, transitionFunction);
70 if(initialState ==
nullptr)
77 res.setStates(states);
78 res.setFinalStates(finalStates);
81 res.addTransition(std::get<0>(transition), std::get<1>(transition), std::get<2>(transition));
86template<
class SymbolType,
class StateType >
96 if(initialState !=
nullptr)
101 finalStates.insert(from);
107 if(iter == symbols.
end())
122 if(iter != symbols.
end())
126template<
class SymbolType,
class StateType >
131template<
class SymbolType,
class StateType >
134 for(
const auto& symbol :
automaton.getInputAlphabet()) {
141 for(
const auto& state :
automaton.getStates()) {
150 composeTransitionsFromState(output,
automaton, state);
156template <
class SymbolType,
class StateType >
161 if ( ! symbolTransitionsFromState.
empty ( ) && symbolTransitionsFromState.
front ( ).first.second == inputSymbol ) {
164 symbolTransitionsFromState.
pop_front ( );
static Token next(ext::istream &input)
Definition: AutomatonFromStringLexer.cpp:12
Deterministic finite automaton. Accepts regular languages.
Definition: DFA.h:71
Basic exception from which all other exceptions are derived.
Definition: CommonException.h:21
static Token peek(ext::istream &input)
Definition: lexer.hpp:53
static void putback(ext::istream &input, const Token &token)
Definition: lexer.hpp:61
Implementation of iterator_range, i.e. pair of iterators. The class provides most notably begin and e...
Definition: range.hpp:24
void pop_front()
Advances the begin iterator.
Definition: range.hpp:145
constexpr bool empty() const
Test whether the iterator_range is empty.
Definition: range.hpp:127
constexpr std::iterator_traits< Iterator >::reference front() const
Getter of the first value in the iterator_range.
Definition: range.hpp:97
Class extending the tuple class from the standard library. Original reason is to allow printing of th...
Definition: tuple.hpp:42
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 std::vector< T, Alloc >::const_iterator const_iterator
The type of constant values iterator.
Definition: vector.hpp:67
auto end() &
Inherited behavior of end for non-const instance.
Definition: vector.hpp:155
typename T::StateType StateType
Definition: ToGrammarLeftRG.h:64
typename T::SymbolType SymbolType
Definition: ReachableStates.h:176
return res
Definition: MinimizeByPartitioning.h:145
Definition: ToGrammar.h:31
Definition: normalize.hpp:10
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
static void initialFinalState(ext::istream &input, bool &rightArrow, bool &leftArrow)
Definition: AutomatonFromStringParserCommon.cpp:10
Definition: stringApi.hpp:26