From a39fd80f24d6d691a4614d73239fc9f1640ce4b0 Mon Sep 17 00:00:00 2001
From: Jan Travnicek <Jan.Travnicek@fit.cvut.cz>
Date: Thu, 14 Jun 2018 16:07:40 +0200
Subject: [PATCH] remove GrammarFeatures and StringFeatures header file

---
 .../grammar/parsing/AbsorbTerminalSymbol.h    |  2 +-
 .../src/grammar/parsing/CornerSubstitution.h  |  2 +-
 .../grammar/parsing/DeterministicLL1Grammar.h |  2 +-
 .../src/grammar/parsing/ExtractRightContext.h |  2 +-
 .../parsing/HandleFirstFirstConflict.h        |  2 +-
 .../parsing/HandleFirstFollowConflict.h       |  2 +-
 .../src/grammar/parsing/LeftFactorize.h       |  2 +-
 .../src/grammar/parsing/common/Substitute.h   |  2 +-
 alib2data/src/alphabet/Symbol.h               |  2 +-
 alib2data/src/grammar/ContextFree/CFG.h       | 21 ++++-----
 alib2data/src/grammar/ContextFree/CNF.h       | 13 ++---
 .../src/grammar/ContextFree/EpsilonFreeCFG.h  | 13 ++---
 alib2data/src/grammar/ContextFree/GNF.h       | 13 ++---
 alib2data/src/grammar/ContextFree/LG.h        | 13 ++---
 alib2data/src/grammar/ContextSensitive/CSG.h  | 13 ++---
 .../ContextSensitive/NonContractingGrammar.h  | 13 ++---
 alib2data/src/grammar/GrammarFeatures.h       | 47 -------------------
 alib2data/src/grammar/Regular/LeftLG.h        | 13 ++---
 alib2data/src/grammar/Regular/LeftRG.h        |  9 ++--
 alib2data/src/grammar/Regular/RightLG.h       | 13 ++---
 alib2data/src/grammar/Regular/RightRG.h       | 13 ++---
 .../ContextPreservingUnrestrictedGrammar.h    | 13 ++---
 .../Unrestricted/UnrestrictedGrammar.h        | 13 ++---
 alib2data/src/label/LabelFeatures.h           | 24 ----------
 alib2data/src/string/CyclicString.h           | 11 +++--
 alib2data/src/string/Epsilon.h                | 10 ++--
 alib2data/src/string/LinearString.h           | 11 +++--
 alib2data/src/string/StringFeatures.h         | 29 ------------
 alib2data/src/string/WildcardLinearString.h   | 15 +++---
 .../string/LinearStringTerminatingSymbol.h    |  3 +-
 30 files changed, 130 insertions(+), 211 deletions(-)
 delete mode 100644 alib2data/src/grammar/GrammarFeatures.h
 delete mode 100644 alib2data/src/label/LabelFeatures.h
 delete mode 100644 alib2data/src/string/StringFeatures.h

diff --git a/alib2algo_experimental/src/grammar/parsing/AbsorbTerminalSymbol.h b/alib2algo_experimental/src/grammar/parsing/AbsorbTerminalSymbol.h
index 6ac109e685..088b055235 100644
--- a/alib2algo_experimental/src/grammar/parsing/AbsorbTerminalSymbol.h
+++ b/alib2algo_experimental/src/grammar/parsing/AbsorbTerminalSymbol.h
@@ -8,7 +8,7 @@
 #ifndef ABSORB_TERMINAL_SYMBOL_H_
 #define ABSORB_TERMINAL_SYMBOL_H_
 
-#include <grammar/GrammarFeatures.h>
+#include <grammar/ContextFree/CFG.h>
 #include <alphabet/Symbol.h>
 #include <alib/set>
 #include <alib/map>
diff --git a/alib2algo_experimental/src/grammar/parsing/CornerSubstitution.h b/alib2algo_experimental/src/grammar/parsing/CornerSubstitution.h
index 8d0edd36b4..d577ed22e1 100644
--- a/alib2algo_experimental/src/grammar/parsing/CornerSubstitution.h
+++ b/alib2algo_experimental/src/grammar/parsing/CornerSubstitution.h
@@ -8,7 +8,7 @@
 #ifndef CORNER_SUBSTITUTION_H_
 #define CORNER_SUBSTITUTION_H_
 
-#include <grammar/GrammarFeatures.h>
+#include <grammar/ContextFree/CFG.h>
 #include <alphabet/Symbol.h>
 
 namespace grammar {
diff --git a/alib2algo_experimental/src/grammar/parsing/DeterministicLL1Grammar.h b/alib2algo_experimental/src/grammar/parsing/DeterministicLL1Grammar.h
index caf6d91685..8a34cae481 100644
--- a/alib2algo_experimental/src/grammar/parsing/DeterministicLL1Grammar.h
+++ b/alib2algo_experimental/src/grammar/parsing/DeterministicLL1Grammar.h
@@ -8,7 +8,7 @@
 #ifndef DETERMINISTIC_LL_1_GRAMMAR_H_
 #define DETERMINISTIC_LL_1_GRAMMAR_H_
 
-#include <grammar/GrammarFeatures.h>
+#include <grammar/ContextFree/CFG.h>
 
 namespace grammar {
 
diff --git a/alib2algo_experimental/src/grammar/parsing/ExtractRightContext.h b/alib2algo_experimental/src/grammar/parsing/ExtractRightContext.h
index 7821f5c04c..060c274154 100644
--- a/alib2algo_experimental/src/grammar/parsing/ExtractRightContext.h
+++ b/alib2algo_experimental/src/grammar/parsing/ExtractRightContext.h
@@ -8,7 +8,7 @@
 #ifndef EXTRACT_RIGHT_CONTEXT_H_
 #define EXTRACT_RIGHT_CONTEXT_H_
 
-#include <grammar/GrammarFeatures.h>
+#include <grammar/ContextFree/CFG.h>
 #include <alphabet/Symbol.h>
 #include <alib/set>
 
diff --git a/alib2algo_experimental/src/grammar/parsing/HandleFirstFirstConflict.h b/alib2algo_experimental/src/grammar/parsing/HandleFirstFirstConflict.h
index cfc6dc16ad..25158338a0 100644
--- a/alib2algo_experimental/src/grammar/parsing/HandleFirstFirstConflict.h
+++ b/alib2algo_experimental/src/grammar/parsing/HandleFirstFirstConflict.h
@@ -8,7 +8,7 @@
 #ifndef HANDLE_FIRST_FIRST_CONFLICT_H_
 #define HANDLE_FIRST_FIRST_CONFLICT_H_
 
-#include <grammar/GrammarFeatures.h>
+#include <grammar/ContextFree/CFG.h>
 #include <alphabet/Symbol.h>
 #include <alib/vector>
 
diff --git a/alib2algo_experimental/src/grammar/parsing/HandleFirstFollowConflict.h b/alib2algo_experimental/src/grammar/parsing/HandleFirstFollowConflict.h
index 02eb3611fe..18bb291c08 100644
--- a/alib2algo_experimental/src/grammar/parsing/HandleFirstFollowConflict.h
+++ b/alib2algo_experimental/src/grammar/parsing/HandleFirstFollowConflict.h
@@ -8,7 +8,7 @@
 #ifndef HANDLE_FIRST_FOLLOW_CONFLICT_H_
 #define HANDLE_FIRST_FOLLOW_CONFLICT_H_
 
-#include <grammar/GrammarFeatures.h>
+#include <grammar/ContextFree/CFG.h>
 #include <alphabet/Symbol.h>
 #include <alib/vector>
 #include <alib/set>
diff --git a/alib2algo_experimental/src/grammar/parsing/LeftFactorize.h b/alib2algo_experimental/src/grammar/parsing/LeftFactorize.h
index e698e2225b..c7d51be4ce 100644
--- a/alib2algo_experimental/src/grammar/parsing/LeftFactorize.h
+++ b/alib2algo_experimental/src/grammar/parsing/LeftFactorize.h
@@ -9,7 +9,7 @@
 #define LEFT_FACTORIZE_H_
 
 #include <alphabet/Symbol.h>
-#include <grammar/GrammarFeatures.h>
+#include <grammar/ContextFree/CFG.h>
 
 namespace grammar {
 
diff --git a/alib2algo_experimental/src/grammar/parsing/common/Substitute.h b/alib2algo_experimental/src/grammar/parsing/common/Substitute.h
index 2799e225fa..f151b80f44 100644
--- a/alib2algo_experimental/src/grammar/parsing/common/Substitute.h
+++ b/alib2algo_experimental/src/grammar/parsing/common/Substitute.h
@@ -8,7 +8,7 @@
 #ifndef SUBSTITUTE_H_
 #define SUBSTITUTE_H_
 
-#include <grammar/GrammarFeatures.h>
+#include <grammar/ContextFree/CFG.h>
 #include <alphabet/Symbol.h>
 #include <alib/vector>
 
diff --git a/alib2data/src/alphabet/Symbol.h b/alib2data/src/alphabet/Symbol.h
index e981051f3c..53cad54173 100644
--- a/alib2data/src/alphabet/Symbol.h
+++ b/alib2data/src/alphabet/Symbol.h
@@ -14,7 +14,7 @@
 #include <alib/set>
 #include <alib/string>
 
-#include <label/LabelFeatures.h>
+#include <label/Label.h>
 
 namespace alphabet {
 
diff --git a/alib2data/src/grammar/ContextFree/CFG.h b/alib2data/src/grammar/ContextFree/CFG.h
index aaee4196e0..42cf0d8dec 100644
--- a/alib2data/src/grammar/ContextFree/CFG.h
+++ b/alib2data/src/grammar/ContextFree/CFG.h
@@ -33,13 +33,16 @@
 #include <core/components.hpp>
 #include <object/UniqueObject.h>
 
-#include "../GrammarBase.h"
-#include "../GrammarFeatures.h"
-#include "../GrammarException.h"
-#include "../common/GrammarNormalize.h"
-#include <alphabet/common/SymbolNormalize.h>
+#include <common/DefaultSymbolType.h>
+
+#include <grammar/GrammarBase.h>
+#include <grammar/GrammarException.h>
 
 #include <core/normalize.hpp>
+#include <alphabet/common/SymbolNormalize.h>
+#include <grammar/common/GrammarNormalize.h>
+
+#include "EpsilonFreeCFG.h"
 
 namespace grammar {
 
@@ -61,7 +64,7 @@ class InitialSymbol;
  *
  * \tparam SymbolType used for the terminal alphabet, the nonterminal alphabet, and the initial symbol of the grammar.
  */
-template < class SymbolType >
+template < class SymbolType = DefaultSymbolType >
 class CFG final : public GrammarBase, public core::Components < CFG < SymbolType >, ext::set < SymbolType >, component::Set, std::tuple < TerminalAlphabet, NonterminalAlphabet >, SymbolType, component::Value, InitialSymbol > {
 	/**
 	 * Rules function as mapping from nonterminal symbol on the left hand side to a set of sequences of terminal and nonterminal symbols.
@@ -311,12 +314,6 @@ public:
 	virtual object::ObjectBase * inc ( ) && override;
 };
 
-} /* namespace grammar */
-
-#include "EpsilonFreeCFG.h"
-
-namespace grammar {
-
 template < class SymbolType >
 CFG < SymbolType >::CFG ( SymbolType initialSymbol ) : CFG ( ext::set < SymbolType > { initialSymbol }, ext::set < SymbolType > ( ), initialSymbol ) {
 }
diff --git a/alib2data/src/grammar/ContextFree/CNF.h b/alib2data/src/grammar/ContextFree/CNF.h
index 1a1f0cceba..5f80302b71 100644
--- a/alib2data/src/grammar/ContextFree/CNF.h
+++ b/alib2data/src/grammar/ContextFree/CNF.h
@@ -34,13 +34,14 @@
 #include <core/components.hpp>
 #include <object/UniqueObject.h>
 
-#include "../GrammarBase.h"
-#include "../GrammarFeatures.h"
-#include "../GrammarException.h"
-#include "../common/GrammarNormalize.h"
-#include <alphabet/common/SymbolNormalize.h>
+#include <common/DefaultSymbolType.h>
+
+#include <grammar/GrammarBase.h>
+#include <grammar/GrammarException.h>
 
 #include <core/normalize.hpp>
+#include <alphabet/common/SymbolNormalize.h>
+#include <grammar/common/GrammarNormalize.h>
 
 namespace grammar {
 
@@ -62,7 +63,7 @@ class InitialSymbol;
  *
  * \tparam SymbolType used for the terminal alphabet, the nonterminal alphabet, and the initial symbol of the grammar.
  */
-template < class SymbolType >
+template < class SymbolType = DefaultSymbolType >
 class CNF final : public GrammarBase, public core::Components < CNF < SymbolType >, ext::set < SymbolType >, component::Set, std::tuple < TerminalAlphabet, NonterminalAlphabet >, SymbolType, component::Value, InitialSymbol > {
 	/**
 	 * Rules function as mapping from nonterminal symbol on the left hand side to a set of sequences of terminal and nonterminal symbols.
diff --git a/alib2data/src/grammar/ContextFree/EpsilonFreeCFG.h b/alib2data/src/grammar/ContextFree/EpsilonFreeCFG.h
index 932b7f19a6..21b37a6418 100644
--- a/alib2data/src/grammar/ContextFree/EpsilonFreeCFG.h
+++ b/alib2data/src/grammar/ContextFree/EpsilonFreeCFG.h
@@ -33,13 +33,14 @@
 #include <core/components.hpp>
 #include <object/UniqueObject.h>
 
-#include "../GrammarBase.h"
-#include "../GrammarFeatures.h"
-#include "../GrammarException.h"
-#include "../common/GrammarNormalize.h"
-#include <alphabet/common/SymbolNormalize.h>
+#include <common/DefaultSymbolType.h>
+
+#include <grammar/GrammarBase.h>
+#include <grammar/GrammarException.h>
 
 #include <core/normalize.hpp>
+#include <alphabet/common/SymbolNormalize.h>
+#include <grammar/common/GrammarNormalize.h>
 
 namespace grammar {
 
@@ -61,7 +62,7 @@ class InitialSymbol;
  *
  * \tparam SymbolType used for the terminal alphabet, the nonterminal alphabet, and the initial symbol of the grammar.
  */
-template < class SymbolType >
+template < class SymbolType = DefaultSymbolType >
 class EpsilonFreeCFG final : public GrammarBase, public core::Components < EpsilonFreeCFG < SymbolType >, ext::set < SymbolType >, component::Set, std::tuple < TerminalAlphabet, NonterminalAlphabet >, SymbolType, component::Value, InitialSymbol > {
 	/**
 	 * Rules function as mapping from nonterminal symbol on the left hand side to a set of sequences of terminal and nonterminal symbols.
diff --git a/alib2data/src/grammar/ContextFree/GNF.h b/alib2data/src/grammar/ContextFree/GNF.h
index 8a9ebe1d4a..42d245a499 100644
--- a/alib2data/src/grammar/ContextFree/GNF.h
+++ b/alib2data/src/grammar/ContextFree/GNF.h
@@ -33,13 +33,14 @@
 #include <core/components.hpp>
 #include <object/UniqueObject.h>
 
-#include "../GrammarBase.h"
-#include "../GrammarFeatures.h"
-#include "../GrammarException.h"
-#include "../common/GrammarNormalize.h"
-#include <alphabet/common/SymbolNormalize.h>
+#include <common/DefaultSymbolType.h>
+
+#include <grammar/GrammarBase.h>
+#include <grammar/GrammarException.h>
 
 #include <core/normalize.hpp>
+#include <alphabet/common/SymbolNormalize.h>
+#include <grammar/common/GrammarNormalize.h>
 
 namespace grammar {
 
@@ -61,7 +62,7 @@ class InitialSymbol;
  *
  * \tparam SymbolType used for the terminal alphabet, the nonterminal alphabet, and the initial symbol of the grammar.
  */
-template < class SymbolType >
+template < class SymbolType = DefaultSymbolType >
 class GNF final : public GrammarBase, public core::Components < GNF < SymbolType >, ext::set < SymbolType >, component::Set, std::tuple < TerminalAlphabet, NonterminalAlphabet >, SymbolType, component::Value, InitialSymbol > {
 	/**
 	 * Rules function as mapping from nonterminal symbol on the left hand side to a set of sequences of terminal and nonterminal symbols.
diff --git a/alib2data/src/grammar/ContextFree/LG.h b/alib2data/src/grammar/ContextFree/LG.h
index 084b89cf00..1b071ae9d7 100644
--- a/alib2data/src/grammar/ContextFree/LG.h
+++ b/alib2data/src/grammar/ContextFree/LG.h
@@ -35,13 +35,14 @@
 #include <core/components.hpp>
 #include <object/UniqueObject.h>
 
-#include "../GrammarBase.h"
-#include "../GrammarFeatures.h"
-#include "../GrammarException.h"
-#include "../common/GrammarNormalize.h"
-#include <alphabet/common/SymbolNormalize.h>
+#include <common/DefaultSymbolType.h>
+
+#include <grammar/GrammarBase.h>
+#include <grammar/GrammarException.h>
 
 #include <core/normalize.hpp>
+#include <alphabet/common/SymbolNormalize.h>
+#include <grammar/common/GrammarNormalize.h>
 
 namespace grammar {
 
@@ -63,7 +64,7 @@ class InitialSymbol;
  *
  * \tparam SymbolType used for the terminal alphabet, the nonterminal alphabet, and the initial symbol of the grammar.
  */
-template < class SymbolType >
+template < class SymbolType = DefaultSymbolType >
 class LG final : public GrammarBase, public core::Components < LG < SymbolType >, ext::set < SymbolType >, component::Set, std::tuple < TerminalAlphabet, NonterminalAlphabet >, SymbolType, component::Value, InitialSymbol > {
 	/**
 	 * Rules function as mapping from nonterminal symbol on the left hand side to a set of sequences of terminal and nonterminal symbols.
diff --git a/alib2data/src/grammar/ContextSensitive/CSG.h b/alib2data/src/grammar/ContextSensitive/CSG.h
index ba8d832d16..748d7bb4a6 100644
--- a/alib2data/src/grammar/ContextSensitive/CSG.h
+++ b/alib2data/src/grammar/ContextSensitive/CSG.h
@@ -33,13 +33,14 @@
 #include <core/components.hpp>
 #include <object/UniqueObject.h>
 
-#include "../GrammarBase.h"
-#include "../GrammarFeatures.h"
-#include "../GrammarException.h"
-#include "../common/GrammarNormalize.h"
-#include <alphabet/common/SymbolNormalize.h>
+#include <common/DefaultSymbolType.h>
+
+#include <grammar/GrammarBase.h>
+#include <grammar/GrammarException.h>
 
 #include <core/normalize.hpp>
+#include <alphabet/common/SymbolNormalize.h>
+#include <grammar/common/GrammarNormalize.h>
 
 namespace grammar {
 
@@ -61,7 +62,7 @@ class InitialSymbol;
  *
  * \tparam SymbolType used for the terminal alphabet, the nonterminal alphabet, and the initial symbol of the grammar.
  */
-template < class SymbolType >
+template < class SymbolType = DefaultSymbolType >
 class CSG final : public GrammarBase, public core::Components < CSG < SymbolType >, ext::set < SymbolType >, component::Set, std::tuple < TerminalAlphabet, NonterminalAlphabet >, SymbolType, component::Value, InitialSymbol > {
 	/**
 	 * Rules function as mapping from nonterminal symbol and contexts on the left hand side to a set of sequences of terminal and nonterminal symbols.
diff --git a/alib2data/src/grammar/ContextSensitive/NonContractingGrammar.h b/alib2data/src/grammar/ContextSensitive/NonContractingGrammar.h
index 26f0ee9a70..27fba1492a 100644
--- a/alib2data/src/grammar/ContextSensitive/NonContractingGrammar.h
+++ b/alib2data/src/grammar/ContextSensitive/NonContractingGrammar.h
@@ -33,13 +33,14 @@
 #include <core/components.hpp>
 #include <object/UniqueObject.h>
 
-#include "../GrammarBase.h"
-#include "../GrammarFeatures.h"
-#include "../GrammarException.h"
-#include "../common/GrammarNormalize.h"
-#include <alphabet/common/SymbolNormalize.h>
+#include <common/DefaultSymbolType.h>
+
+#include <grammar/GrammarBase.h>
+#include <grammar/GrammarException.h>
 
 #include <core/normalize.hpp>
+#include <alphabet/common/SymbolNormalize.h>
+#include <grammar/common/GrammarNormalize.h>
 
 namespace grammar {
 
@@ -61,7 +62,7 @@ class InitialSymbol;
  *
  * \tparam SymbolType used for the terminal alphabet, the nonterminal alphabet, and the initial symbol of the grammar.
  */
-template < class SymbolType >
+template < class SymbolType = DefaultSymbolType >
 class NonContractingGrammar final : public GrammarBase, public core::Components < NonContractingGrammar < SymbolType >, ext::set < SymbolType >, component::Set, std::tuple < TerminalAlphabet, NonterminalAlphabet >, SymbolType, component::Value, InitialSymbol > {
 	/**
 	 * Rules function as mapping from nonterminal symbol on the left hand side to a set of sequences of terminal and nonterminal symbols.
diff --git a/alib2data/src/grammar/GrammarFeatures.h b/alib2data/src/grammar/GrammarFeatures.h
deleted file mode 100644
index 49e94fa390..0000000000
--- a/alib2data/src/grammar/GrammarFeatures.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * GrammarFeatures.h
- *
- *  Created on: Jun 19, 2014
- *      Author: Jan Travnicek
- */
-
-#ifndef GRAMMAR_FEATURES_H_
-#define GRAMMAR_FEATURES_H_
-
-#include <common/DefaultSymbolType.h>
-
-namespace grammar {
-
-class Grammar;
-class GrammarBase;
-
-template<class SymbolType = DefaultSymbolType >
-class LeftLG;
-template<class SymbolType = DefaultSymbolType >
-class LeftRG;
-template<class SymbolType = DefaultSymbolType >
-class RightLG;
-template<class SymbolType = DefaultSymbolType >
-class RightRG;
-template<class SymbolType = DefaultSymbolType >
-class LG;
-template<class SymbolType = DefaultSymbolType >
-class CFG;
-template<class SymbolType = DefaultSymbolType >
-class EpsilonFreeCFG;
-template<class SymbolType = DefaultSymbolType >
-class CNF;
-template<class SymbolType = DefaultSymbolType >
-class GNF;
-template<class SymbolType = DefaultSymbolType >
-class CSG;
-template<class SymbolType = DefaultSymbolType >
-class NonContractingGrammar;
-template<class SymbolType = DefaultSymbolType >
-class ContextPreservingUnrestrictedGrammar;
-template<class SymbolType = DefaultSymbolType >
-class UnrestrictedGrammar;
-
-} /* namespace grammar */
-
-#endif /* GRAMMAR_FEATURES_H_ */
diff --git a/alib2data/src/grammar/Regular/LeftLG.h b/alib2data/src/grammar/Regular/LeftLG.h
index 88b3280862..0137a99030 100644
--- a/alib2data/src/grammar/Regular/LeftLG.h
+++ b/alib2data/src/grammar/Regular/LeftLG.h
@@ -34,13 +34,14 @@
 #include <core/components.hpp>
 #include <object/UniqueObject.h>
 
-#include "../GrammarBase.h"
-#include "../GrammarFeatures.h"
-#include "../GrammarException.h"
-#include "../common/GrammarNormalize.h"
-#include <alphabet/common/SymbolNormalize.h>
+#include <common/DefaultSymbolType.h>
+
+#include <grammar/GrammarBase.h>
+#include <grammar/GrammarException.h>
 
 #include <core/normalize.hpp>
+#include <alphabet/common/SymbolNormalize.h>
+#include <grammar/common/GrammarNormalize.h>
 
 namespace grammar {
 
@@ -62,7 +63,7 @@ class InitialSymbol;
  *
  * \tparam SymbolType used for the terminal alphabet, the nonterminal alphabet, and the initial symbol of the grammar.
  */
-template < class SymbolType >
+template < class SymbolType = DefaultSymbolType >
 class LeftLG final : public GrammarBase, public core::Components < LeftLG < SymbolType >, ext::set < SymbolType >, component::Set, std::tuple < TerminalAlphabet, NonterminalAlphabet >, SymbolType, component::Value, InitialSymbol > {
 	/**
 	 * Rules as mapping from nonterminal symbol on the left hand side to set of either sequence of terminal symbols or doublets of sequence of terminal symbols and nonterminal symbol.
diff --git a/alib2data/src/grammar/Regular/LeftRG.h b/alib2data/src/grammar/Regular/LeftRG.h
index 4d3c944834..89f53eea50 100644
--- a/alib2data/src/grammar/Regular/LeftRG.h
+++ b/alib2data/src/grammar/Regular/LeftRG.h
@@ -34,13 +34,14 @@
 #include <core/components.hpp>
 #include <object/UniqueObject.h>
 
+#include <common/DefaultSymbolType.h>
+
 #include <grammar/GrammarBase.h>
-#include <grammar/GrammarFeatures.h>
 #include <grammar/GrammarException.h>
-#include <grammar/common/GrammarNormalize.h>
-#include <alphabet/common/SymbolNormalize.h>
 
 #include <core/normalize.hpp>
+#include <alphabet/common/SymbolNormalize.h>
+#include <grammar/common/GrammarNormalize.h>
 
 namespace grammar {
 
@@ -66,7 +67,7 @@ class InitialSymbol;
  *
  * \tparam SymbolType used for the terminal alphabet, the nonterminal alphabet, and the initial symbol of the grammar.
  */
-template < class SymbolType >
+template < class SymbolType = DefaultSymbolType >
 class LeftRG final : public GrammarBase, public core::Components < LeftRG < SymbolType >, ext::set < SymbolType >, component::Set, std::tuple < TerminalAlphabet, NonterminalAlphabet >, SymbolType, component::Value, InitialSymbol > {
 	/**
 	 * Rules as mapping from nonterminal symbol on the left hand side to set of either terminal symbols or doublets of terminal symbol and nonterminal symbol.
diff --git a/alib2data/src/grammar/Regular/RightLG.h b/alib2data/src/grammar/Regular/RightLG.h
index 4ed5386fff..ee8b24379f 100644
--- a/alib2data/src/grammar/Regular/RightLG.h
+++ b/alib2data/src/grammar/Regular/RightLG.h
@@ -34,13 +34,14 @@
 #include <core/components.hpp>
 #include <object/UniqueObject.h>
 
-#include "../GrammarBase.h"
-#include "../GrammarFeatures.h"
-#include "../GrammarException.h"
-#include "../common/GrammarNormalize.h"
-#include <alphabet/common/SymbolNormalize.h>
+#include <common/DefaultSymbolType.h>
+
+#include <grammar/GrammarBase.h>
+#include <grammar/GrammarException.h>
 
 #include <core/normalize.hpp>
+#include <alphabet/common/SymbolNormalize.h>
+#include <grammar/common/GrammarNormalize.h>
 
 namespace grammar {
 
@@ -62,7 +63,7 @@ class InitialSymbol;
  *
  * \tparam SymbolType used for the terminal alphabet, the nonterminal alphabet, and the initial symbol of the grammar.
  */
-template < class SymbolType >
+template < class SymbolType = DefaultSymbolType >
 class RightLG final : public GrammarBase, public core::Components < RightLG < SymbolType >, ext::set < SymbolType >, component::Set, std::tuple < TerminalAlphabet, NonterminalAlphabet >, SymbolType, component::Value, InitialSymbol > {
 	/**
 	 * Rules as mapping from nonterminal symbol on the left hand side to set of either sequence of terminal symbols or doublets of sequence of nonterminal symbol and terminal symbols.
diff --git a/alib2data/src/grammar/Regular/RightRG.h b/alib2data/src/grammar/Regular/RightRG.h
index 5c3df888eb..8bed8b56e4 100644
--- a/alib2data/src/grammar/Regular/RightRG.h
+++ b/alib2data/src/grammar/Regular/RightRG.h
@@ -34,13 +34,14 @@
 #include <core/components.hpp>
 #include <object/UniqueObject.h>
 
-#include "../GrammarBase.h"
-#include "../GrammarFeatures.h"
-#include "../GrammarException.h"
-#include "../common/GrammarNormalize.h"
-#include <alphabet/common/SymbolNormalize.h>
+#include <common/DefaultSymbolType.h>
+
+#include <grammar/GrammarBase.h>
+#include <grammar/GrammarException.h>
 
 #include <core/normalize.hpp>
+#include <alphabet/common/SymbolNormalize.h>
+#include <grammar/common/GrammarNormalize.h>
 
 namespace grammar {
 
@@ -66,7 +67,7 @@ class InitialSymbol;
  *
  * \tparam SymbolType used for the terminal alphabet, the nonterminal alphabet, and the initial symbol of the grammar.
  */
-template < class SymbolType >
+template < class SymbolType = DefaultSymbolType >
 class RightRG final : public GrammarBase, public core::Components < RightRG < SymbolType >, ext::set < SymbolType >, component::Set, std::tuple < TerminalAlphabet, NonterminalAlphabet >, SymbolType, component::Value, InitialSymbol > {
 	/**
 	 * Rules function as mapping from nonterminal symbol on the left hand side to set of either terminal symbols or doublets of terminal symbol and nonterminal symbol.
diff --git a/alib2data/src/grammar/Unrestricted/ContextPreservingUnrestrictedGrammar.h b/alib2data/src/grammar/Unrestricted/ContextPreservingUnrestrictedGrammar.h
index 84965ffe38..17e2a93124 100644
--- a/alib2data/src/grammar/Unrestricted/ContextPreservingUnrestrictedGrammar.h
+++ b/alib2data/src/grammar/Unrestricted/ContextPreservingUnrestrictedGrammar.h
@@ -33,13 +33,14 @@
 #include <core/components.hpp>
 #include <object/UniqueObject.h>
 
-#include "../GrammarBase.h"
-#include "../GrammarFeatures.h"
-#include "../GrammarException.h"
-#include "../common/GrammarNormalize.h"
-#include <alphabet/common/SymbolNormalize.h>
+#include <common/DefaultSymbolType.h>
+
+#include <grammar/GrammarBase.h>
+#include <grammar/GrammarException.h>
 
 #include <core/normalize.hpp>
+#include <alphabet/common/SymbolNormalize.h>
+#include <grammar/common/GrammarNormalize.h>
 
 namespace grammar {
 
@@ -61,7 +62,7 @@ class InitialSymbol;
  *
  * \tparam SymbolType used for the terminal alphabet, the nonterminal alphabet, and the initial symbol of the grammar.
  */
-template < class SymbolType >
+template < class SymbolType = DefaultSymbolType >
 class ContextPreservingUnrestrictedGrammar final : public GrammarBase, public core::Components < ContextPreservingUnrestrictedGrammar < SymbolType >, ext::set < SymbolType >, component::Set, std::tuple < TerminalAlphabet, NonterminalAlphabet >, SymbolType, component::Value, InitialSymbol > {
 	/**
 	 * Rules function as mapping from nonterminal symbol and contexts on the left hand side to a set of sequences of terminal and nonterminal symbols.
diff --git a/alib2data/src/grammar/Unrestricted/UnrestrictedGrammar.h b/alib2data/src/grammar/Unrestricted/UnrestrictedGrammar.h
index e0158d1e6f..5105e85f86 100644
--- a/alib2data/src/grammar/Unrestricted/UnrestrictedGrammar.h
+++ b/alib2data/src/grammar/Unrestricted/UnrestrictedGrammar.h
@@ -33,13 +33,14 @@
 #include <core/components.hpp>
 #include <object/UniqueObject.h>
 
-#include "../GrammarBase.h"
-#include "../GrammarFeatures.h"
-#include "../GrammarException.h"
-#include "../common/GrammarNormalize.h"
-#include <alphabet/common/SymbolNormalize.h>
+#include <common/DefaultSymbolType.h>
+
+#include <grammar/GrammarBase.h>
+#include <grammar/GrammarException.h>
 
 #include <core/normalize.hpp>
+#include <alphabet/common/SymbolNormalize.h>
+#include <grammar/common/GrammarNormalize.h>
 
 namespace grammar {
 
@@ -61,7 +62,7 @@ class InitialSymbol;
  *
  * \tparam SymbolType used for the terminal alphabet, the nonterminal alphabet, and the initial symbol of the grammar.
  */
-template < class SymbolType >
+template < class SymbolType = DefaultSymbolType >
 class UnrestrictedGrammar final : public GrammarBase, public core::Components < UnrestrictedGrammar < SymbolType >, ext::set < SymbolType >, component::Set, std::tuple < TerminalAlphabet, NonterminalAlphabet >, SymbolType, component::Value, InitialSymbol > {
 	/**
 	 * Rules function as mapping from nonterminal symbol and contexts on the left hand side to a set of sequences of terminal and nonterminal symbols.
diff --git a/alib2data/src/label/LabelFeatures.h b/alib2data/src/label/LabelFeatures.h
deleted file mode 100644
index ed4327bde7..0000000000
--- a/alib2data/src/label/LabelFeatures.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * LabelFeatures.h
- *
- *  Created on: Jun 19, 2014
- *      Author: Jan Travnicek
- */
-
-#ifndef LABEL_FEATURES_H_
-#define LABEL_FEATURES_H_
-
-namespace label {
-
-class Label;
-class LabelBase;
-
-class PrimitiveLabel;
-class UniqueLabel;
-class InitialStateLabel;
-class FailStateLabel;
-class FinalStateLabel;
-
-} /* namespace label */
-
-#endif /* LABEL_FEATURES_H_ */
diff --git a/alib2data/src/string/CyclicString.h b/alib2data/src/string/CyclicString.h
index 22d1e5c265..a18f17c189 100644
--- a/alib2data/src/string/CyclicString.h
+++ b/alib2data/src/string/CyclicString.h
@@ -32,12 +32,15 @@
 #include <core/components.hpp>
 #include <object/UniqueObject.h>
 
-#include "StringBase.h"
-#include "StringFeatures.h"
+#include <common/DefaultSymbolType.h>
+
+#include <string/StringBase.h>
 #include <exception/CommonException.h>
-#include <alphabet/common/SymbolNormalize.h>
 
 #include <core/normalize.hpp>
+#include <alphabet/common/SymbolNormalize.h>
+
+#include "Epsilon.h"
 
 namespace string {
 
@@ -57,7 +60,7 @@ class GeneralAlphabet;
  *
  * \tparam SymbolType used for the terminal alphabet
  */
-template < class SymbolType >
+template < class SymbolType = DefaultSymbolType >
 class CyclicString final : public StringBase, public core::Components < CyclicString < SymbolType >, ext::set < SymbolType >, component::Set, GeneralAlphabet > {
 	/**
 	 * Representation of the string content.
diff --git a/alib2data/src/string/Epsilon.h b/alib2data/src/string/Epsilon.h
index 7b6655c6fe..e862b45c5d 100644
--- a/alib2data/src/string/Epsilon.h
+++ b/alib2data/src/string/Epsilon.h
@@ -30,11 +30,13 @@
 #include <core/components.hpp>
 #include <object/UniqueObject.h>
 
-#include "StringBase.h"
-#include "StringFeatures.h"
-#include <alphabet/common/SymbolNormalize.h>
+#include <common/DefaultSymbolType.h>
+
+#include <string/StringBase.h>
+#include <exception/CommonException.h>
 
 #include <core/normalize.hpp>
+#include <alphabet/common/SymbolNormalize.h>
 
 namespace string {
 
@@ -54,7 +56,7 @@ class GeneralAlphabet;
  *
  * \tparam SymbolType used for the terminal alphabet
  */
-template < class SymbolType >
+template < class SymbolType = DefaultSymbolType >
 class Epsilon final : public StringBase, public core::Components < Epsilon < SymbolType >, ext::set < SymbolType >, component::Set, GeneralAlphabet > {
 	/**
 	 * Representation of the epsilon content.
diff --git a/alib2data/src/string/LinearString.h b/alib2data/src/string/LinearString.h
index 8e252c720a..45dd9bb1a7 100644
--- a/alib2data/src/string/LinearString.h
+++ b/alib2data/src/string/LinearString.h
@@ -32,12 +32,15 @@
 #include <core/components.hpp>
 #include <object/UniqueObject.h>
 
-#include "StringBase.h"
-#include "StringFeatures.h"
+#include <common/DefaultSymbolType.h>
+
+#include <string/StringBase.h>
 #include <exception/CommonException.h>
-#include <alphabet/common/SymbolNormalize.h>
 
 #include <core/normalize.hpp>
+#include <alphabet/common/SymbolNormalize.h>
+
+#include "Epsilon.h"
 
 namespace string {
 
@@ -54,7 +57,7 @@ class GeneralAlphabet;
  *
  * \tparam SymbolType used for the terminal alphabet
  */
-template < class SymbolType >
+template < class SymbolType = DefaultSymbolType >
 class LinearString final : public StringBase, public core::Components < LinearString < SymbolType >, ext::set < SymbolType >, component::Set, GeneralAlphabet > {
 	/**
 	 * Representation of the string content.
diff --git a/alib2data/src/string/StringFeatures.h b/alib2data/src/string/StringFeatures.h
deleted file mode 100644
index a0dd06fc26..0000000000
--- a/alib2data/src/string/StringFeatures.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * StringFeatures.h
- *
- *  Created on: Jun 19, 2014
- *      Author: Jan Travnicek
- */
-
-#ifndef STRING_FEATURES_H_
-#define STRING_FEATURES_H_
-
-#include <common/DefaultSymbolType.h>
-
-namespace string {
-
-class String;
-class StringBase;
-
-template < class SymbolType = DefaultSymbolType >
-class Epsilon;
-template < class SymbolType = DefaultSymbolType >
-class LinearString;
-template < class SymbolType = DefaultSymbolType >
-class WildcardLinearString;
-template < class SymbolType = DefaultSymbolType >
-class CyclicString;
-
-} /* namespace string */
-
-#endif /* STRING_FEATURES_H_ */
diff --git a/alib2data/src/string/WildcardLinearString.h b/alib2data/src/string/WildcardLinearString.h
index 67ba0e27da..93daf8143f 100644
--- a/alib2data/src/string/WildcardLinearString.h
+++ b/alib2data/src/string/WildcardLinearString.h
@@ -16,15 +16,16 @@
 #include <core/components.hpp>
 #include <object/UniqueObject.h>
 
-#include "StringBase.h"
-#include "StringFeatures.h"
-#include "LinearString.h"
-#include <exception/CommonException.h>
-#include <alphabet/common/SymbolNormalize.h>
-
 #include <alphabet/WildcardSymbol.h>
+#include <common/DefaultSymbolType.h>
+
+#include <string/StringBase.h>
+#include <exception/CommonException.h>
 
 #include <core/normalize.hpp>
+#include <alphabet/common/SymbolNormalize.h>
+
+#include "LinearString.h"
 
 namespace string {
 
@@ -43,7 +44,7 @@ class WildcardSymbol;
  *
  * \tparam SymbolType used for the terminal alphabet
  */
-template < class SymbolType >
+template < class SymbolType = DefaultSymbolType >
 class WildcardLinearString final : public StringBase, public core::Components < WildcardLinearString < SymbolType >, ext::set < SymbolType >, component::Set, GeneralAlphabet, SymbolType, component::Value, WildcardSymbol > {
 	/**
 	 * Representation of the string content.
diff --git a/alib2data_experimental/src/string/LinearStringTerminatingSymbol.h b/alib2data_experimental/src/string/LinearStringTerminatingSymbol.h
index 5947d522e6..196cd30c13 100644
--- a/alib2data_experimental/src/string/LinearStringTerminatingSymbol.h
+++ b/alib2data_experimental/src/string/LinearStringTerminatingSymbol.h
@@ -14,7 +14,6 @@
 #include <alib/deque>
 
 #include <string/StringBase.h>
-#include <string/StringFeatures.h>
 
 #include <alphabet/Symbol.h>
 #include <core/components.hpp>
@@ -22,6 +21,8 @@
 #include <sax/Token.h>
 #include <core/xmlApi.hpp>
 
+#include <string/LinearString.h>
+
 namespace string {
 
 class GeneralAlphabet;
-- 
GitLab