Skip to content
Snippets Groups Projects
Commit 4dc06b48 authored by Jan Trávníček's avatar Jan Trávníček
Browse files

template CNF grammar

parent 2826a324
No related branches found
No related tags found
No related merge requests found
Showing
with 31 additions and 31 deletions
......@@ -79,7 +79,7 @@ bool GrammarCompare::testCompare(const grammar::EpsilonFreeCFG& a, const grammar
a.getTerminalAlphabet() == b.getTerminalAlphabet() ;
}
 
bool GrammarCompare::testCompare(const grammar::CNF& a, const grammar::CNF& b) {
bool GrammarCompare::testCompare(const grammar::CNF < > & a, const grammar::CNF < > & b) {
return a.getNonterminalAlphabet() == b.getNonterminalAlphabet() &&
a.getRules() == b.getRules() &&
a.getInitialSymbol() == b.getInitialSymbol() &&
......@@ -379,7 +379,7 @@ void GrammarCompare::printCompare(const grammar::EpsilonFreeCFG& a, const gramma
}
}
 
void GrammarCompare::printCompare(const grammar::CNF& a, const grammar::CNF& b) {
void GrammarCompare::printCompare(const grammar::CNF < > & a, const grammar::CNF < > & b) {
std::cout << "GrammarCompareer" << std::endl;
 
if(a.getNonterminalAlphabet() != b.getNonterminalAlphabet()) {
......@@ -636,7 +636,7 @@ int GrammarCompare::compare(const grammar::EpsilonFreeCFG& a, const grammar::Eps
 
auto GrammarCompareEpsilonFreeCFG = GrammarCompare::RegistratorWrapper<int, grammar::EpsilonFreeCFG, grammar::EpsilonFreeCFG>(GrammarCompare::compare);
 
int GrammarCompare::compare(const grammar::CNF& a, const grammar::CNF& b) {
int GrammarCompare::compare(const grammar::CNF < > & a, const grammar::CNF < > & b) {
if(!GrammarCompare::testCompare(a, b)) {
GrammarCompare::printCompare(a, b);
return 1;
......@@ -645,7 +645,7 @@ int GrammarCompare::compare(const grammar::CNF& a, const grammar::CNF& b) {
}
}
 
auto GrammarCompareCNF = GrammarCompare::RegistratorWrapper<int, grammar::CNF, grammar::CNF>(GrammarCompare::compare);
auto GrammarCompareCNF = GrammarCompare::RegistratorWrapper<int, grammar::CNF < >, grammar::CNF < > >(GrammarCompare::compare);
 
int GrammarCompare::compare(const grammar::GNF& a, const grammar::GNF& b) {
if(!GrammarCompare::testCompare(a, b)) {
......
......@@ -41,8 +41,8 @@ private:
static bool testCompare(const grammar::EpsilonFreeCFG& a, const grammar::EpsilonFreeCFG& b);
static void printCompare(const grammar::EpsilonFreeCFG& a, const grammar::EpsilonFreeCFG& b);
 
static bool testCompare(const grammar::CNF& a, const grammar::CNF& b);
static void printCompare(const grammar::CNF& a, const grammar::CNF& b);
static bool testCompare(const grammar::CNF < > & a, const grammar::CNF < > & b);
static void printCompare(const grammar::CNF < > & a, const grammar::CNF < > & b);
 
static bool testCompare(const grammar::GNF& a, const grammar::GNF& b);
static void printCompare(const grammar::GNF& a, const grammar::GNF& b);
......@@ -70,7 +70,7 @@ public:
static int compare(const grammar::LG& a, const grammar::LG& b);
static int compare(const grammar::CFG < > & a, const grammar::CFG < > & b);
static int compare(const grammar::EpsilonFreeCFG& a, const grammar::EpsilonFreeCFG& b);
static int compare(const grammar::CNF& a, const grammar::CNF& b);
static int compare(const grammar::CNF < > & a, const grammar::CNF < > & b);
static int compare(const grammar::GNF& a, const grammar::GNF& b);
static int compare(const grammar::CSG& a, const grammar::CSG& b);
static int compare(const grammar::NonContractingGrammar& a, const grammar::NonContractingGrammar& b);
......
......@@ -12,7 +12,7 @@ namespace grammar {
 
namespace generate {
 
bool CockeYoungerKasami::generate ( const grammar::CNF & grammar, const string::LinearString < > & string ) {
bool CockeYoungerKasami::generate ( const grammar::CNF < > & grammar, const string::LinearString < > & string ) {
unsigned stringSize = string.getContent ( ).size ( );
 
if ( ( stringSize == 0 ) && grammar.getGeneratesEpsilon ( ) ) return true;
......@@ -76,7 +76,7 @@ bool CockeYoungerKasami::generate ( const grammar::CNF & grammar, const string::
return data[stringSize - 1][0].count ( grammar.getInitialSymbol ( ) );
}
 
auto CockeYoungerKasamiCNF = CockeYoungerKasami::RegistratorWrapper < bool, grammar::CNF > ( CockeYoungerKasami::generate );
auto CockeYoungerKasamiCNF = CockeYoungerKasami::RegistratorWrapper < bool, grammar::CNF < > > ( CockeYoungerKasami::generate );
 
bool CockeYoungerKasami::generate ( const grammar::Grammar & grammar, const string::LinearString < > & string ) {
return dispatch ( grammar.getData ( ), string );
......
......@@ -25,7 +25,7 @@ class CockeYoungerKasami : public std::SingleDispatch < CockeYoungerKasami, bool
public:
static bool generate ( const grammar::Grammar & grammar, const string::LinearString < > & string );
 
static bool generate ( const grammar::CNF & grammar, const string::LinearString < > & string );
static bool generate ( const grammar::CNF < > & grammar, const string::LinearString < > & string );
 
};
 
......
......@@ -63,7 +63,7 @@ std::set<string::LinearString < >> GenerateUpToLength::generate( const T & gramm
 
auto GenerateUpToLengthEpsilonFreeCFG = GenerateUpToLength::RegistratorWrapper<std::set<string::LinearString < >>, grammar::EpsilonFreeCFG>(GenerateUpToLength::generate);
auto GenerateUpToLengthGNF = GenerateUpToLength::RegistratorWrapper<std::set<string::LinearString < >>, grammar::GNF>(GenerateUpToLength::generate);
auto GenerateUpToLengthCNF = GenerateUpToLength::RegistratorWrapper<std::set<string::LinearString < >>, grammar::CNF>(GenerateUpToLength::generate);
auto GenerateUpToLengthCNF = GenerateUpToLength::RegistratorWrapper<std::set<string::LinearString < >>, grammar::CNF < > >(GenerateUpToLength::generate);
auto GenerateUpToLengthLeftRG = GenerateUpToLength::RegistratorWrapper<std::set<string::LinearString < >>, grammar::LeftRG>(GenerateUpToLength::generate);
auto GenerateUpToLengthRightRG = GenerateUpToLength::RegistratorWrapper<std::set<string::LinearString < >>, grammar::RightRG>(GenerateUpToLength::generate);
 
......
......@@ -107,7 +107,7 @@ std::set < std::variant < alphabet::Symbol, string::Epsilon < > > > First::first
auto FirstCFG = FirstBase1::RegistratorWrapper < FirstResult1, grammar::CFG < > > ( First::first );
auto FirstEpsilonFreeCFG = FirstBase1::RegistratorWrapper < FirstResult1, grammar::EpsilonFreeCFG > ( First::first );
auto FirstGNF = FirstBase1::RegistratorWrapper < FirstResult1, grammar::GNF > ( First::first );
auto FirstCNF = FirstBase1::RegistratorWrapper < FirstResult1, grammar::CNF > ( First::first );
auto FirstCNF = FirstBase1::RegistratorWrapper < FirstResult1, grammar::CNF < > > ( First::first );
auto FirstLG = FirstBase1::RegistratorWrapper < FirstResult1, grammar::LG > ( First::first );
auto FirstLeftLG = FirstBase1::RegistratorWrapper < FirstResult1, grammar::LeftLG > ( First::first );
auto FirstLeftRG = FirstBase1::RegistratorWrapper < FirstResult1, grammar::LeftRG > ( First::first );
......@@ -121,7 +121,7 @@ std::map < std::vector < alphabet::Symbol >, std::set < std::variant < alphabet:
auto FirstCFG2 = FirstBase2::RegistratorWrapper < FirstResult2, grammar::CFG < > > ( First::first );
auto FirstEpsilonFreeCFG2 = FirstBase2::RegistratorWrapper < FirstResult2, grammar::EpsilonFreeCFG > ( First::first );
auto FirstGNF2 = FirstBase2::RegistratorWrapper < FirstResult2, grammar::GNF > ( First::first );
auto FirstCNF2 = FirstBase2::RegistratorWrapper < FirstResult2, grammar::CNF > ( First::first );
auto FirstCNF2 = FirstBase2::RegistratorWrapper < FirstResult2, grammar::CNF < > > ( First::first );
auto FirstLG2 = FirstBase2::RegistratorWrapper < FirstResult2, grammar::LG > ( First::first );
auto FirstLeftLG2 = FirstBase2::RegistratorWrapper < FirstResult2, grammar::LeftLG > ( First::first );
auto FirstLeftRG2 = FirstBase2::RegistratorWrapper < FirstResult2, grammar::LeftRG > ( First::first );
......
......@@ -95,7 +95,7 @@ std::set < std::variant < alphabet::Symbol, string::Epsilon < > > > Follow::foll
auto FollowCFG = FollowBase1::RegistratorWrapper < FollowResult1, grammar::CFG < > > ( Follow::follow );
auto FollowEpsilonFreeCFG = FollowBase1::RegistratorWrapper < FollowResult1, grammar::EpsilonFreeCFG > ( Follow::follow );
auto FollowGNF = FollowBase1::RegistratorWrapper < FollowResult1, grammar::GNF > ( Follow::follow );
auto FollowCNF = FollowBase1::RegistratorWrapper < FollowResult1, grammar::CNF > ( Follow::follow );
auto FollowCNF = FollowBase1::RegistratorWrapper < FollowResult1, grammar::CNF < > > ( Follow::follow );
auto FollowLG = FollowBase1::RegistratorWrapper < FollowResult1, grammar::LG > ( Follow::follow );
auto FollowLeftLG = FollowBase1::RegistratorWrapper < FollowResult1, grammar::LeftLG > ( Follow::follow );
auto FollowLeftRG = FollowBase1::RegistratorWrapper < FollowResult1, grammar::LeftRG > ( Follow::follow );
......@@ -109,7 +109,7 @@ std::map < alphabet::Symbol, std::set < std::variant < alphabet::Symbol, string:
auto FollowCFG2 = FollowBase2::RegistratorWrapper < FollowResult2, grammar::CFG < > > ( Follow::follow );
auto FollowEpsilonFreeCFG2 = FollowBase2::RegistratorWrapper < FollowResult2, grammar::EpsilonFreeCFG > ( Follow::follow );
auto FollowGNF2 = FollowBase2::RegistratorWrapper < FollowResult2, grammar::GNF > ( Follow::follow );
auto FollowCNF2 = FollowBase2::RegistratorWrapper < FollowResult2, grammar::CNF > ( Follow::follow );
auto FollowCNF2 = FollowBase2::RegistratorWrapper < FollowResult2, grammar::CNF < > > ( Follow::follow );
auto FollowLG2 = FollowBase2::RegistratorWrapper < FollowResult2, grammar::LG > ( Follow::follow );
auto FollowLeftLG2 = FollowBase2::RegistratorWrapper < FollowResult2, grammar::LeftLG > ( Follow::follow );
auto FollowLeftRG2 = FollowBase2::RegistratorWrapper < FollowResult2, grammar::LeftRG > ( Follow::follow );
......
......@@ -53,7 +53,7 @@ std::map < std::pair < std::variant < alphabet::Symbol, string::Epsilon < > >, a
auto LL1ParseTableCFG = LL1ParseTable::RegistratorWrapper < std::map < std::pair < std::variant < alphabet::Symbol, string::Epsilon < > >, alphabet::Symbol >, std::set < std::vector < alphabet::Symbol > > >, grammar::CFG < > > ( LL1ParseTable::parseTable );
auto LL1ParseTableEpsilonFreeCFG = LL1ParseTable::RegistratorWrapper < std::map < std::pair < std::variant < alphabet::Symbol, string::Epsilon < > >, alphabet::Symbol >, std::set < std::vector < alphabet::Symbol > > >, grammar::EpsilonFreeCFG > ( LL1ParseTable::parseTable );
auto LL1ParseTableGNF = LL1ParseTable::RegistratorWrapper < std::map < std::pair < std::variant < alphabet::Symbol, string::Epsilon < > >, alphabet::Symbol >, std::set < std::vector < alphabet::Symbol > > >, grammar::GNF > ( LL1ParseTable::parseTable );
auto LL1ParseTableCNF = LL1ParseTable::RegistratorWrapper < std::map < std::pair < std::variant < alphabet::Symbol, string::Epsilon < > >, alphabet::Symbol >, std::set < std::vector < alphabet::Symbol > > >, grammar::CNF > ( LL1ParseTable::parseTable );
auto LL1ParseTableCNF = LL1ParseTable::RegistratorWrapper < std::map < std::pair < std::variant < alphabet::Symbol, string::Epsilon < > >, alphabet::Symbol >, std::set < std::vector < alphabet::Symbol > > >, grammar::CNF < > > ( LL1ParseTable::parseTable );
auto LL1ParseTableLG = LL1ParseTable::RegistratorWrapper < std::map < std::pair < std::variant < alphabet::Symbol, string::Epsilon < > >, alphabet::Symbol >, std::set < std::vector < alphabet::Symbol > > >, grammar::LG > ( LL1ParseTable::parseTable );
auto LL1ParseTableLeftLG = LL1ParseTable::RegistratorWrapper < std::map < std::pair < std::variant < alphabet::Symbol, string::Epsilon < > >, alphabet::Symbol >, std::set < std::vector < alphabet::Symbol > > >, grammar::LeftLG > ( LL1ParseTable::parseTable );
auto LL1ParseTableLeftRG = LL1ParseTable::RegistratorWrapper < std::map < std::pair < std::variant < alphabet::Symbol, string::Epsilon < > >, alphabet::Symbol >, std::set < std::vector < alphabet::Symbol > > >, grammar::LeftRG > ( LL1ParseTable::parseTable );
......
......@@ -31,7 +31,7 @@ bool IsLanguageEmpty::isLanguageEmpty( const T & grammar ) {
auto IsLanguageEmptyCFG = IsLanguageEmpty::RegistratorWrapper<bool, grammar::CFG < > >(IsLanguageEmpty::isLanguageEmpty);
auto IsLanguageEmptyEpsilonFreeCFG = IsLanguageEmpty::RegistratorWrapper<bool, grammar::EpsilonFreeCFG>(IsLanguageEmpty::isLanguageEmpty);
auto IsLanguageEmptyGNF = IsLanguageEmpty::RegistratorWrapper<bool, grammar::GNF>(IsLanguageEmpty::isLanguageEmpty);
auto IsLanguageEmptyCNF = IsLanguageEmpty::RegistratorWrapper<bool, grammar::CNF>(IsLanguageEmpty::isLanguageEmpty);
auto IsLanguageEmptyCNF = IsLanguageEmpty::RegistratorWrapper<bool, grammar::CNF < > >(IsLanguageEmpty::isLanguageEmpty);
auto IsLanguageEmptyLG = IsLanguageEmpty::RegistratorWrapper<bool, grammar::LG>(IsLanguageEmpty::isLanguageEmpty);
auto IsLanguageEmptyLeftLG = IsLanguageEmpty::RegistratorWrapper<bool, grammar::LeftLG>(IsLanguageEmpty::isLanguageEmpty);
auto IsLanguageEmptyLeftRG = IsLanguageEmpty::RegistratorWrapper<bool, grammar::LeftRG>(IsLanguageEmpty::isLanguageEmpty);
......
......@@ -31,7 +31,7 @@ bool IsLanguageGeneratingEpsilon::isLanguageGeneratingEpsilon( const T & grammar
auto IsLanguageGeneratingEpsilonCFG = IsLanguageGeneratingEpsilon::RegistratorWrapper<bool, grammar::CFG < > >(IsLanguageGeneratingEpsilon::isLanguageGeneratingEpsilon);
auto IsLanguageGeneratingEpsilonEpsilonFreeCFG = IsLanguageGeneratingEpsilon::RegistratorWrapper<bool, grammar::EpsilonFreeCFG>(IsLanguageGeneratingEpsilon::isLanguageGeneratingEpsilon);
auto IsLanguageGeneratingEpsilonGNF = IsLanguageGeneratingEpsilon::RegistratorWrapper<bool, grammar::GNF>(IsLanguageGeneratingEpsilon::isLanguageGeneratingEpsilon);
auto IsLanguageGeneratingEpsilonCNF = IsLanguageGeneratingEpsilon::RegistratorWrapper<bool, grammar::CNF>(IsLanguageGeneratingEpsilon::isLanguageGeneratingEpsilon);
auto IsLanguageGeneratingEpsilonCNF = IsLanguageGeneratingEpsilon::RegistratorWrapper<bool, grammar::CNF < > >(IsLanguageGeneratingEpsilon::isLanguageGeneratingEpsilon);
auto IsLanguageGeneratingEpsilonLG = IsLanguageGeneratingEpsilon::RegistratorWrapper<bool, grammar::LG>(IsLanguageGeneratingEpsilon::isLanguageGeneratingEpsilon);
auto IsLanguageGeneratingEpsilonLeftLG = IsLanguageGeneratingEpsilon::RegistratorWrapper<bool, grammar::LeftLG>(IsLanguageGeneratingEpsilon::isLanguageGeneratingEpsilon);
auto IsLanguageGeneratingEpsilonLeftRG = IsLanguageGeneratingEpsilon::RegistratorWrapper<bool, grammar::LeftRG>(IsLanguageGeneratingEpsilon::isLanguageGeneratingEpsilon);
......
......@@ -60,7 +60,7 @@ std::set<alphabet::Symbol> NonterminalUnitRuleCycle::getNonterminalUnitRuleCycle
auto NonterminalUnitRuleCycleCFG = NonterminalUnitRuleCycle::RegistratorWrapper<std::set<alphabet::Symbol>, grammar::CFG < > >(NonterminalUnitRuleCycle::getNonterminalUnitRuleCycle);
auto NonterminalUnitRuleCycleEpsilonFreeCFG = NonterminalUnitRuleCycle::RegistratorWrapper<std::set<alphabet::Symbol>, grammar::EpsilonFreeCFG>(NonterminalUnitRuleCycle::getNonterminalUnitRuleCycle);
auto NonterminalUnitRuleCycleGNF = NonterminalUnitRuleCycle::RegistratorWrapper<std::set<alphabet::Symbol>, grammar::GNF>(NonterminalUnitRuleCycle::getNonterminalUnitRuleCycle);
auto NonterminalUnitRuleCycleCNF = NonterminalUnitRuleCycle::RegistratorWrapper<std::set<alphabet::Symbol>, grammar::CNF>(NonterminalUnitRuleCycle::getNonterminalUnitRuleCycle);
auto NonterminalUnitRuleCycleCNF = NonterminalUnitRuleCycle::RegistratorWrapper<std::set<alphabet::Symbol>, grammar::CNF < > >(NonterminalUnitRuleCycle::getNonterminalUnitRuleCycle);
auto NonterminalUnitRuleCycleLG = NonterminalUnitRuleCycle::RegistratorWrapper<std::set<alphabet::Symbol>, grammar::LG>(NonterminalUnitRuleCycle::getNonterminalUnitRuleCycle);
auto NonterminalUnitRuleCycleLeftLG = NonterminalUnitRuleCycle::RegistratorWrapper<std::set<alphabet::Symbol>, grammar::LeftLG>(NonterminalUnitRuleCycle::getNonterminalUnitRuleCycle);
auto NonterminalUnitRuleCycleLeftRG = NonterminalUnitRuleCycle::RegistratorWrapper<std::set<alphabet::Symbol>, grammar::LeftRG>(NonterminalUnitRuleCycle::getNonterminalUnitRuleCycle);
......
......@@ -54,7 +54,7 @@ std::set<alphabet::Symbol> NullableNonterminals::getNullableNonterminals(const T
auto NullableNonterminalsCFG = NullableNonterminals::RegistratorWrapper<std::set<alphabet::Symbol>, grammar::CFG < > >(NullableNonterminals::getNullableNonterminals);
auto NullableNonterminalsEpsilonFreeCFG = NullableNonterminals::RegistratorWrapper<std::set<alphabet::Symbol>, grammar::EpsilonFreeCFG>(NullableNonterminals::getNullableNonterminals);
auto NullableNonterminalsGNF = NullableNonterminals::RegistratorWrapper<std::set<alphabet::Symbol>, grammar::GNF>(NullableNonterminals::getNullableNonterminals);
auto NullableNonterminalsCNF = NullableNonterminals::RegistratorWrapper<std::set<alphabet::Symbol>, grammar::CNF>(NullableNonterminals::getNullableNonterminals);
auto NullableNonterminalsCNF = NullableNonterminals::RegistratorWrapper<std::set<alphabet::Symbol>, grammar::CNF < > >(NullableNonterminals::getNullableNonterminals);
auto NullableNonterminalsLG = NullableNonterminals::RegistratorWrapper<std::set<alphabet::Symbol>, grammar::LG>(NullableNonterminals::getNullableNonterminals);
auto NullableNonterminalsLeftLG = NullableNonterminals::RegistratorWrapper<std::set<alphabet::Symbol>, grammar::LeftLG>(NullableNonterminals::getNullableNonterminals);
auto NullableNonterminalsLeftRG = NullableNonterminals::RegistratorWrapper<std::set<alphabet::Symbol>, grammar::LeftRG>(NullableNonterminals::getNullableNonterminals);
......
......@@ -59,7 +59,7 @@ std::set<alphabet::Symbol> ProductiveNonterminals::getProductiveNonterminals( co
auto ProductiveNonterminalsCFG = ProductiveNonterminals::RegistratorWrapper<std::set<alphabet::Symbol>, grammar::CFG < > >(ProductiveNonterminals::getProductiveNonterminals);
auto ProductiveNonterminalsEpsilonFreeCFG = ProductiveNonterminals::RegistratorWrapper<std::set<alphabet::Symbol>, grammar::EpsilonFreeCFG>(ProductiveNonterminals::getProductiveNonterminals);
auto ProductiveNonterminalsGNF = ProductiveNonterminals::RegistratorWrapper<std::set<alphabet::Symbol>, grammar::GNF>(ProductiveNonterminals::getProductiveNonterminals);
auto ProductiveNonterminalsCNF = ProductiveNonterminals::RegistratorWrapper<std::set<alphabet::Symbol>, grammar::CNF>(ProductiveNonterminals::getProductiveNonterminals);
auto ProductiveNonterminalsCNF = ProductiveNonterminals::RegistratorWrapper<std::set<alphabet::Symbol>, grammar::CNF < > >(ProductiveNonterminals::getProductiveNonterminals);
auto ProductiveNonterminalsLG = ProductiveNonterminals::RegistratorWrapper<std::set<alphabet::Symbol>, grammar::LG>(ProductiveNonterminals::getProductiveNonterminals);
auto ProductiveNonterminalsLeftLG = ProductiveNonterminals::RegistratorWrapper<std::set<alphabet::Symbol>, grammar::LeftLG>(ProductiveNonterminals::getProductiveNonterminals);
auto ProductiveNonterminalsLeftRG = ProductiveNonterminals::RegistratorWrapper<std::set<alphabet::Symbol>, grammar::LeftRG>(ProductiveNonterminals::getProductiveNonterminals);
......
......@@ -66,7 +66,7 @@ bool RecursiveNonterminal::isNonterminalRecursive ( const T & grammar, const alp
auto RecursiveNonterminalCFG = RecursiveNonterminal::RegistratorWrapper < bool, grammar::CFG < > > ( RecursiveNonterminal::isNonterminalRecursive );
auto RecursiveNonterminalEpsilonFreeCFG = RecursiveNonterminal::RegistratorWrapper < bool, grammar::EpsilonFreeCFG > ( RecursiveNonterminal::isNonterminalRecursive );
auto RecursiveNonterminalGNF = RecursiveNonterminal::RegistratorWrapper < bool, grammar::GNF > ( RecursiveNonterminal::isNonterminalRecursive );
auto RecursiveNonterminalCNF = RecursiveNonterminal::RegistratorWrapper < bool, grammar::CNF > ( RecursiveNonterminal::isNonterminalRecursive );
auto RecursiveNonterminalCNF = RecursiveNonterminal::RegistratorWrapper < bool, grammar::CNF < > > ( RecursiveNonterminal::isNonterminalRecursive );
auto RecursiveNonterminalLG = RecursiveNonterminal::RegistratorWrapper < bool, grammar::LG > ( RecursiveNonterminal::isNonterminalRecursive );
auto RecursiveNonterminalLeftLG = RecursiveNonterminal::RegistratorWrapper < bool, grammar::LeftLG > ( RecursiveNonterminal::isNonterminalRecursive );
auto RecursiveNonterminalLeftRG = RecursiveNonterminal::RegistratorWrapper < bool, grammar::LeftRG > ( RecursiveNonterminal::isNonterminalRecursive );
......
......@@ -60,7 +60,7 @@ std::set<alphabet::Symbol> UnreachableSymbols::getUnreachableSymbols( const T &
auto UnreachableSymbolsCFG = UnreachableSymbols::RegistratorWrapper<std::set<alphabet::Symbol>, grammar::CFG < > >(UnreachableSymbols::getUnreachableSymbols);
auto UnreachableSymbolsEpsilonFreeCFG = UnreachableSymbols::RegistratorWrapper<std::set<alphabet::Symbol>, grammar::EpsilonFreeCFG>(UnreachableSymbols::getUnreachableSymbols);
auto UnreachableSymbolsGNF = UnreachableSymbols::RegistratorWrapper<std::set<alphabet::Symbol>, grammar::GNF>(UnreachableSymbols::getUnreachableSymbols);
auto UnreachableSymbolsCNF = UnreachableSymbols::RegistratorWrapper<std::set<alphabet::Symbol>, grammar::CNF>(UnreachableSymbols::getUnreachableSymbols);
auto UnreachableSymbolsCNF = UnreachableSymbols::RegistratorWrapper<std::set<alphabet::Symbol>, grammar::CNF < > >(UnreachableSymbols::getUnreachableSymbols);
auto UnreachableSymbolsLG = UnreachableSymbols::RegistratorWrapper<std::set<alphabet::Symbol>, grammar::LG>(UnreachableSymbols::getUnreachableSymbols);
auto UnreachableSymbolsLeftLG = UnreachableSymbols::RegistratorWrapper<std::set<alphabet::Symbol>, grammar::LeftLG>(UnreachableSymbols::getUnreachableSymbols);
auto UnreachableSymbolsLeftRG = UnreachableSymbols::RegistratorWrapper<std::set<alphabet::Symbol>, grammar::LeftRG>(UnreachableSymbols::getUnreachableSymbols);
......
......@@ -64,11 +64,11 @@ grammar::EpsilonFreeCFG EpsilonRemover::remove(const grammar::EpsilonFreeCFG& or
 
auto EpsilonRemoverEpsilonFreeCFG = EpsilonRemover::RegistratorWrapper<grammar::EpsilonFreeCFG, grammar::EpsilonFreeCFG>(EpsilonRemover::remove);
 
grammar::CNF EpsilonRemover::remove(const grammar::CNF& origGrammar) {
grammar::CNF < > EpsilonRemover::remove(const grammar::CNF < > & origGrammar) {
return origGrammar;
}
 
auto EpsilonRemoverCNF = EpsilonRemover::RegistratorWrapper<grammar::CNF, grammar::CNF>(EpsilonRemover::remove);
auto EpsilonRemoverCNF = EpsilonRemover::RegistratorWrapper<grammar::CNF < >, grammar::CNF < > >(EpsilonRemover::remove);
 
grammar::GNF EpsilonRemover::remove(const grammar::GNF& origGrammar) {
return origGrammar;
......
......@@ -35,7 +35,7 @@ public:
static grammar::EpsilonFreeCFG remove( const grammar::CFG < > & grammar );
static grammar::EpsilonFreeCFG remove( const grammar::EpsilonFreeCFG & grammar );
static grammar::GNF remove( const grammar::GNF & grammar );
static grammar::CNF remove( const grammar::CNF & grammar );
static grammar::CNF < > remove( const grammar::CNF < > & grammar );
static grammar::EpsilonFreeCFG remove( const grammar::LG & grammar );
static grammar::EpsilonFreeCFG remove( const grammar::LeftLG & grammar );
static grammar::LeftRG remove( const grammar::LeftRG & grammar );
......
......@@ -128,7 +128,7 @@ grammar::EpsilonFreeCFG LeftRecursionRemover::remove(const grammar::EpsilonFreeC
 
auto LeftRecursionRemoverEpsilonFreeCFG = LeftRecursionRemover::RegistratorWrapper<grammar::EpsilonFreeCFG, grammar::EpsilonFreeCFG>(LeftRecursionRemover::remove);
 
grammar::EpsilonFreeCFG LeftRecursionRemover::remove(const grammar::CNF& origGrammar) {
grammar::EpsilonFreeCFG LeftRecursionRemover::remove(const grammar::CNF < > & origGrammar) {
EpsilonFreeCFG tmp(origGrammar.getInitialSymbol());
tmp.setTerminalAlphabet(origGrammar.getTerminalAlphabet());
tmp.setNonterminalAlphabet(origGrammar.getNonterminalAlphabet());
......@@ -146,7 +146,7 @@ grammar::EpsilonFreeCFG LeftRecursionRemover::remove(const grammar::CNF& origGra
return remove(tmp);
}
 
auto LeftRecursionRemoverCNF = LeftRecursionRemover::RegistratorWrapper<grammar::EpsilonFreeCFG, grammar::CNF>(LeftRecursionRemover::remove);
auto LeftRecursionRemoverCNF = LeftRecursionRemover::RegistratorWrapper<grammar::EpsilonFreeCFG, grammar::CNF < > >(LeftRecursionRemover::remove);
 
grammar::GNF LeftRecursionRemover::remove(const grammar::GNF& origGrammar) {
return origGrammar;
......
......@@ -33,7 +33,7 @@ public:
static grammar::Grammar remove( const grammar::Grammar & grammar );
 
static grammar::EpsilonFreeCFG remove( const grammar::EpsilonFreeCFG & grammar );
static grammar::EpsilonFreeCFG remove( const grammar::CNF & grammar );
static grammar::EpsilonFreeCFG remove( const grammar::CNF < > & grammar );
static grammar::GNF remove( const grammar::GNF & grammar );
static grammar::RightRG remove( const grammar::RightRG & grammar );
static grammar::RightLG remove( const grammar::RightLG & grammar );
......
......@@ -79,11 +79,11 @@ grammar::EpsilonFreeCFG SimpleRulesRemover::remove(const grammar::EpsilonFreeCFG
 
auto SimpleRulesRemoverEpsilonFreeCFG = SimpleRulesRemover::RegistratorWrapper<grammar::EpsilonFreeCFG, grammar::EpsilonFreeCFG>(SimpleRulesRemover::remove);
 
grammar::CNF SimpleRulesRemover::remove(const grammar::CNF& origGrammar) {
grammar::CNF < > SimpleRulesRemover::remove(const grammar::CNF < > & origGrammar) {
return origGrammar;
}
 
auto SimpleRulesRemoverCNF = SimpleRulesRemover::RegistratorWrapper<grammar::CNF, grammar::CNF>(SimpleRulesRemover::remove);
auto SimpleRulesRemoverCNF = SimpleRulesRemover::RegistratorWrapper<grammar::CNF < >, grammar::CNF < > >(SimpleRulesRemover::remove);
 
grammar::GNF SimpleRulesRemover::remove(const grammar::GNF& origGrammar) {
return origGrammar;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment