52 requires isDFA < T > || isNFA < T >
57requires isDFA < T > || isNFA < T >
69 for (
const auto& transition :
automaton.getTransitions ( ) ) {
70 const auto & from = transition.first.first;
71 const auto & input = transition.first.second;
72 const auto & to = transition.second;
76 if (
automaton.getFinalStates ( ).contains ( to ) )
77 grammar.addRule ( from, input );
82 grammar.setGeneratesEpsilon (
true );
Definition: ToGrammarRightRG.h:40
static grammar::RightRG< typename T::SymbolType, typename T::StateType > convert(const T &automaton)
Right regular grammar in Chomsky hierarchy or type 3 in Chomsky hierarchy. Generates regular language...
Definition: RightRG.h:70
typename T::StateType StateType
Definition: ToGrammarLeftRG.h:64
return grammar
Definition: ToGrammarLeftRG.h:99
typename T::SymbolType SymbolType
Definition: ReachableStates.h:176
Definition: ToGrammar.h:31
Definition: converterCommon.hpp:8
constexpr auto make_pair(T1 &&x, T2 &&y)
Definition: pair.hpp:79
Definition: ToAutomaton.h:24