13#include <ext/hexavigesimal>
45 template <
class T,
class SymbolType =
typename regexp::SymbolTypeOfRegexp < T > >
50template <
class T,
class SymbolType >
56 unsigned nonterminalId = 0;
70 T r = std::move ( Ni.back ( ) );
73 for(
const auto & a :
regexp.getAlphabet()) {
78 if ( ! nonterminalMap.contains ( derived ) ) {
79 Ni.push_back(derived);
81 grammar.addNonterminalSymbol ( nt );
82 nonterminalMap.
insert ( derived, nt );
93 grammar.setGeneratesEpsilon(
true);
Class extending the deque class from the standard library. Original reason is to allow printing of th...
Definition: deque.hpp:44
Class extending the map class from the standard library. Original reason is to allow printing of the ...
Definition: map.hpp:48
R & at(const T &key, R &defaultValue)
Definition: map.hpp:163
std::pair< iterator, bool > insert(const T &key, const R &value)
Insert variant with explicit key and value parameters.
Definition: map.hpp:118
Right regular grammar in Chomsky hierarchy or type 3 in Chomsky hierarchy. Generates regular language...
Definition: RightRG.h:70
Definition: ToGrammarRightRGDerivation.h:33
static grammar::RightRG< SymbolType, unsigned > convert(const T ®exp)
Definition: ToGrammarRightRGDerivation.h:51
static bool languageContainsEpsilon(const regexp::FormalRegExpElement< SymbolType > ®exp)
Definition: RegExpEpsilon.h:91
static regexp::UnboundedRegExp< SymbolType > optimize(const regexp::UnboundedRegExp< SymbolType > ®exp)
return grammar
Definition: ToGrammarLeftRG.h:99
T createUnique(T object, const Alphabets &... alphabets)
Definition: createUnique.hpp:46
Definition: converterCommon.hpp:8
constexpr auto make_pair(T1 &&x, T2 &&y)
Definition: pair.hpp:79
Definition: ToAutomaton.h:24
Definition: ToAutomaton.h:15