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

remove Grammar wrapper

parent a55a0423
No related branches found
No related tags found
No related merge requests found
Showing
with 15 additions and 34 deletions
......@@ -8,9 +8,6 @@
#ifndef GRAMMAR_H_
#define GRAMMAR_H_
 
#include <base/WrapperBase.hpp>
#include "GrammarBase.h"
#include <alib/type_traits>
 
namespace grammar {
......@@ -18,10 +15,7 @@ namespace grammar {
/**
* Wrapper around grammars.
*/
class Grammar : public base::WrapperBase < GrammarBase > {
using base::WrapperBase < GrammarBase >::WrapperBase;
};
class Grammar;
 
template < class T >
using TerminalSymbolTypeOfGrammar = typename std::decay < decltype (std::declval<T>().getTerminalAlphabet()) >::type::value_type;
......
......@@ -16,7 +16,6 @@ namespace {
static auto xmlWrite = registration::XmlWriterRegister < grammar::CFG < > > ( );
static auto xmlRead = registration::XmlReaderRegister < grammar::CFG < > > ( );
 
static auto xmlGroup1 = registration::XmlRegisterTypeInGroup < grammar::Grammar, grammar::CFG < > > ( );
static auto xmlGroup2 = registration::XmlRegisterTypeInGroup < object::Object, grammar::CFG < > > ( );
static auto xmlGroup = registration::XmlRegisterTypeInGroup < object::Object, grammar::CFG < > > ( );
 
} /* namespace */
......@@ -16,7 +16,6 @@ namespace {
static auto xmlWrite = registration::XmlWriterRegister < grammar::CNF < > > ( );
static auto xmlRead = registration::XmlReaderRegister < grammar::CNF < > > ( );
 
static auto xmlGroup1 = registration::XmlRegisterTypeInGroup < grammar::Grammar, grammar::CNF < > > ( );
static auto xmlGroup2 = registration::XmlRegisterTypeInGroup < object::Object, grammar::CNF < > > ( );
static auto xmlGroup = registration::XmlRegisterTypeInGroup < object::Object, grammar::CNF < > > ( );
 
} /* namespace */
......@@ -14,9 +14,8 @@
namespace {
 
static auto xmlWrite = registration::XmlWriterRegister < grammar::EpsilonFreeCFG < > > ( );
static auto xmlGroup = registration::XmlReaderRegister < grammar::EpsilonFreeCFG < > > ( );
static auto xmlRead = registration::XmlReaderRegister < grammar::EpsilonFreeCFG < > > ( );
 
static auto xmlGroup1 = registration::XmlRegisterTypeInGroup < grammar::Grammar, grammar::EpsilonFreeCFG < > > ( );
static auto xmlGroup2 = registration::XmlRegisterTypeInGroup < object::Object, grammar::EpsilonFreeCFG < > > ( );
static auto xmlGroup = registration::XmlRegisterTypeInGroup < object::Object, grammar::EpsilonFreeCFG < > > ( );
 
} /* namespace */
......@@ -16,7 +16,6 @@ namespace {
static auto xmlWrite = registration::XmlWriterRegister < grammar::GNF < > > ( );
static auto xmlRead = registration::XmlReaderRegister < grammar::GNF < > > ( );
 
static auto xmlGroup1 = registration::XmlRegisterTypeInGroup < grammar::Grammar, grammar::GNF < > > ( );
static auto xmlGroup2 = registration::XmlRegisterTypeInGroup < object::Object, grammar::GNF < > > ( );
static auto xmlGroup = registration::XmlRegisterTypeInGroup < object::Object, grammar::GNF < > > ( );
 
} /* namespace */
......@@ -16,7 +16,6 @@ namespace {
static auto xmlWrite = registration::XmlWriterRegister < grammar::LG < > > ( );
static auto xmlRead = registration::XmlReaderRegister < grammar::LG < > > ( );
 
static auto xmlGroup1 = registration::XmlRegisterTypeInGroup < grammar::Grammar, grammar::LG < > > ( );
static auto xmlGroup2 = registration::XmlRegisterTypeInGroup < object::Object, grammar::LG < > > ( );
static auto xmlGroup = registration::XmlRegisterTypeInGroup < object::Object, grammar::LG < > > ( );
 
} /* namespace */
......@@ -16,7 +16,6 @@ namespace {
static auto xmlWrite = registration::XmlWriterRegister < grammar::CSG < > > ( );
static auto xmlRead = registration::XmlReaderRegister < grammar::CSG < > > ( );
 
static auto xmlGroup1 = registration::XmlRegisterTypeInGroup < grammar::Grammar, grammar::CSG < > > ( );
static auto xmlGroup2 = registration::XmlRegisterTypeInGroup < object::Object, grammar::CSG < > > ( );
static auto xmlGroup = registration::XmlRegisterTypeInGroup < object::Object, grammar::CSG < > > ( );
 
} /* namespace */
......@@ -16,7 +16,6 @@ namespace {
static auto xmlWrite = registration::XmlWriterRegister < grammar::NonContractingGrammar < > > ( );
static auto xmlRead = registration::XmlReaderRegister < grammar::NonContractingGrammar < > > ( );
 
static auto xmlGroup1 = registration::XmlRegisterTypeInGroup < grammar::Grammar, grammar::NonContractingGrammar < > > ( );
static auto xmlGroup2 = registration::XmlRegisterTypeInGroup < object::Object, grammar::NonContractingGrammar < > > ( );
static auto xmlGroup = registration::XmlRegisterTypeInGroup < object::Object, grammar::NonContractingGrammar < > > ( );
 
} /* namespace */
......@@ -16,7 +16,6 @@ namespace {
static auto xmlWrite = registration::XmlWriterRegister < grammar::LeftLG < > > ( );
static auto xmlRead = registration::XmlReaderRegister < grammar::LeftLG < > > ( );
 
static auto xmlGroup1 = registration::XmlRegisterTypeInGroup < grammar::Grammar, grammar::LeftLG < > > ( );
static auto xmlGroup2 = registration::XmlRegisterTypeInGroup < object::Object, grammar::LeftLG < > > ( );
static auto xmlGroup = registration::XmlRegisterTypeInGroup < object::Object, grammar::LeftLG < > > ( );
 
} /* namespace */
......@@ -16,7 +16,6 @@ namespace {
static auto xmlWrite = registration::XmlWriterRegister < grammar::LeftRG < > > ( );
static auto xmlRead = registration::XmlReaderRegister < grammar::LeftRG < > > ( );
 
static auto xmlGroup1 = registration::XmlRegisterTypeInGroup < grammar::Grammar, grammar::LeftRG < > > ( );
static auto xmlGroup2 = registration::XmlRegisterTypeInGroup < object::Object, grammar::LeftRG < > > ( );
static auto xmlGroup = registration::XmlRegisterTypeInGroup < object::Object, grammar::LeftRG < > > ( );
 
} /* namespace */
......@@ -16,7 +16,6 @@ namespace {
static auto xmlWrite = registration::XmlWriterRegister < grammar::RightLG < > > ( );
static auto xmlRead = registration::XmlReaderRegister < grammar::RightLG < > > ( );
 
static auto xmlGroup1 = registration::XmlRegisterTypeInGroup < grammar::Grammar, grammar::RightLG < > > ( );
static auto xmlGroup2 = registration::XmlRegisterTypeInGroup < object::Object, grammar::RightLG < > > ( );
static auto xmlGroup = registration::XmlRegisterTypeInGroup < object::Object, grammar::RightLG < > > ( );
 
} /* namespace */
......@@ -16,7 +16,6 @@ namespace {
static auto xmlWrite = registration::XmlWriterRegister < grammar::RightRG < > > ( );
static auto xmlRead = registration::XmlReaderRegister < grammar::RightRG < > > ( );
 
static auto xmlGroup1 = registration::XmlRegisterTypeInGroup < grammar::Grammar, grammar::RightRG < > > ( );
static auto xmlGroup2 = registration::XmlRegisterTypeInGroup < object::Object, grammar::RightRG < > > ( );
static auto xmlGroup = registration::XmlRegisterTypeInGroup < object::Object, grammar::RightRG < > > ( );
 
} /* namespace */
......@@ -16,7 +16,6 @@ namespace {
static auto xmlWrite = registration::XmlWriterRegister < grammar::ContextPreservingUnrestrictedGrammar < > > ( );
static auto xmlRead = registration::XmlReaderRegister < grammar::ContextPreservingUnrestrictedGrammar < > > ( );
 
static auto xmlGroup1 = registration::XmlRegisterTypeInGroup < grammar::Grammar, grammar::ContextPreservingUnrestrictedGrammar < > > ( );
static auto xmlGroup2 = registration::XmlRegisterTypeInGroup < object::Object, grammar::ContextPreservingUnrestrictedGrammar < > > ( );
static auto xmlGroup = registration::XmlRegisterTypeInGroup < object::Object, grammar::ContextPreservingUnrestrictedGrammar < > > ( );
 
} /* namespace */
......@@ -16,7 +16,6 @@ namespace {
static auto xmlWrite = registration::XmlWriterRegister < grammar::UnrestrictedGrammar < > > ( );
static auto xmlRead = registration::XmlReaderRegister < grammar::UnrestrictedGrammar < > > ( );
 
static auto xmlGroup1 = registration::XmlRegisterTypeInGroup < grammar::Grammar, grammar::UnrestrictedGrammar < > > ( );
static auto xmlGroup2 = registration::XmlRegisterTypeInGroup < object::Object, grammar::UnrestrictedGrammar < > > ( );
static auto xmlGroup = registration::XmlRegisterTypeInGroup < object::Object, grammar::UnrestrictedGrammar < > > ( );
 
} /* namespace */
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