28template <
class TerminalSymbolType,
class NonterminalSymbolType >
34template <
class TerminalSymbolType,
class NonterminalSymbolType >
37 const NonterminalSymbolType & lhs = kv.first;
43 if ( symb.template is < TerminalSymbolType > ( ) && src.
getTerminalAlphabet ( ).count ( symb.template get < TerminalSymbolType > ( ) ) )
44 newRhs.push_back ( symb.template get < TerminalSymbolType > ( ) );
46 newRhs.push_back (
ext::make_pair ( symb.template get < NonterminalSymbolType > ( ), suffix ) );
Class extending the pair class from the standard library. Original reason is to allow printing of the...
Definition: pair.hpp:43
Implementation of the variant class allowing to store any type of those listed in the template parame...
Definition: variant.hpp:98
Class extending the vector class from the standard library. Original reason is to allow printing of t...
Definition: vector.hpp:45
Context free grammar in Chomsky hierarchy or type 2 in Chomsky hierarchy. Generates context free lang...
Definition: CFG.h:67
const ext::set< TerminalSymbolType > & getTerminalAlphabet() const &
Definition: CFG.h:215
const ext::set< NonterminalSymbolType > & getNonterminalAlphabet() const &
Definition: CFG.h:177
const ext::map< NonterminalSymbolType, ext::set< ext::vector< ext::variant< TerminalSymbolType, NonterminalSymbolType > > > > & getRules() const &
Definition: CFG.h:332
void copyNonterminalsRename(grammar::CFG< TerminalSymbolType, ext::pair< NonterminalSymbolType, unsigned > > &dst, const grammar::CFG< TerminalSymbolType, NonterminalSymbolType > &src, const unsigned suffix)
Definition: GrammarTransformCommon.h:29
void copyRulesRenameNonterminals(grammar::CFG< TerminalSymbolType, ext::pair< NonterminalSymbolType, unsigned > > &dst, const grammar::CFG< TerminalSymbolType, NonterminalSymbolType > &src, const unsigned suffix)
Definition: GrammarTransformCommon.h:35
constexpr auto make_pair(T1 &&x, T2 &&y)
Definition: pair.hpp:79