From a09fc26ca2d4f9fa41b273c42d6373efd897d7f2 Mon Sep 17 00:00:00 2001
From: Jan Travnicek <Jan.Travnicek@fit.cvut.cz>
Date: Mon, 17 Feb 2020 08:47:42 +0100
Subject: [PATCH] unit build in string grammar context free

---
 .../string/ContextFree/{CFG.cpp => CFG.cxx}    |  4 ++--
 .../string/ContextFree/{CNF.cpp => CNF.cxx}    |  4 ++--
 .../grammar/string/ContextFree/ContextFree.cpp |  5 +++++
 .../string/ContextFree/EpsilonFreeCFG.cpp      | 18 ------------------
 .../string/ContextFree/EpsilonFreeCFG.cxx      | 18 ++++++++++++++++++
 .../string/ContextFree/{GNF.cpp => GNF.cxx}    |  4 ++--
 .../string/ContextFree/{LG.cpp => LG.cxx}      |  4 ++--
 7 files changed, 31 insertions(+), 26 deletions(-)
 rename alib2str/src/grammar/string/ContextFree/{CFG.cpp => CFG.cxx} (52%)
 rename alib2str/src/grammar/string/ContextFree/{CNF.cpp => CNF.cxx} (52%)
 create mode 100644 alib2str/src/grammar/string/ContextFree/ContextFree.cpp
 delete mode 100644 alib2str/src/grammar/string/ContextFree/EpsilonFreeCFG.cpp
 create mode 100644 alib2str/src/grammar/string/ContextFree/EpsilonFreeCFG.cxx
 rename alib2str/src/grammar/string/ContextFree/{GNF.cpp => GNF.cxx} (52%)
 rename alib2str/src/grammar/string/ContextFree/{LG.cpp => LG.cxx} (52%)

diff --git a/alib2str/src/grammar/string/ContextFree/CFG.cpp b/alib2str/src/grammar/string/ContextFree/CFG.cxx
similarity index 52%
rename from alib2str/src/grammar/string/ContextFree/CFG.cpp
rename to alib2str/src/grammar/string/ContextFree/CFG.cxx
index 4bf3f26b8a..8c0b5aa817 100644
--- a/alib2str/src/grammar/string/ContextFree/CFG.cpp
+++ b/alib2str/src/grammar/string/ContextFree/CFG.cxx
@@ -12,7 +12,7 @@
 
 namespace {
 
-auto stringWrite = registration::StringWriterRegister < grammar::CFG < > > ( );
-auto stringReader = registration::StringReaderRegister < grammar::Grammar, grammar::CFG < > > ( );
+auto stringWriteCFG = registration::StringWriterRegister < grammar::CFG < > > ( );
+auto stringReaderCFG = registration::StringReaderRegister < grammar::Grammar, grammar::CFG < > > ( );
 
 } /* namespace */
diff --git a/alib2str/src/grammar/string/ContextFree/CNF.cpp b/alib2str/src/grammar/string/ContextFree/CNF.cxx
similarity index 52%
rename from alib2str/src/grammar/string/ContextFree/CNF.cpp
rename to alib2str/src/grammar/string/ContextFree/CNF.cxx
index 54594f0134..358624a0a2 100644
--- a/alib2str/src/grammar/string/ContextFree/CNF.cpp
+++ b/alib2str/src/grammar/string/ContextFree/CNF.cxx
@@ -12,7 +12,7 @@
 
 namespace {
 
-auto stringWrite = registration::StringWriterRegister < grammar::CNF < > > ( );
-auto stringReader = registration::StringReaderRegister < grammar::Grammar, grammar::CNF < > > ( );
+auto stringWriteCNF = registration::StringWriterRegister < grammar::CNF < > > ( );
+auto stringReaderCNF = registration::StringReaderRegister < grammar::Grammar, grammar::CNF < > > ( );
 
 } /* namespace */
diff --git a/alib2str/src/grammar/string/ContextFree/ContextFree.cpp b/alib2str/src/grammar/string/ContextFree/ContextFree.cpp
new file mode 100644
index 0000000000..adb4f75bf4
--- /dev/null
+++ b/alib2str/src/grammar/string/ContextFree/ContextFree.cpp
@@ -0,0 +1,5 @@
+#include "CFG.cxx"
+#include "CNF.cxx"
+#include "EpsilonFreeCFG.cxx"
+#include "GNF.cxx"
+#include "LG.cxx"
diff --git a/alib2str/src/grammar/string/ContextFree/EpsilonFreeCFG.cpp b/alib2str/src/grammar/string/ContextFree/EpsilonFreeCFG.cpp
deleted file mode 100644
index 16fc2cb9e1..0000000000
--- a/alib2str/src/grammar/string/ContextFree/EpsilonFreeCFG.cpp
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * EpsilonFreeCFG.cpp
- *
- * Created on: Sep 27, 2017
- * Author: Jan Travnicek
- */
-
-#include "EpsilonFreeCFG.h"
-#include <grammar/Grammar.h>
-
-#include <registration/StringRegistration.hpp>
-
-namespace {
-
-auto stringWrite = registration::StringWriterRegister < grammar::EpsilonFreeCFG < > > ( );
-auto stringReader = registration::StringReaderRegister < grammar::Grammar, grammar::EpsilonFreeCFG < > > ( );
-
-} /* namespace */
diff --git a/alib2str/src/grammar/string/ContextFree/EpsilonFreeCFG.cxx b/alib2str/src/grammar/string/ContextFree/EpsilonFreeCFG.cxx
new file mode 100644
index 0000000000..d927c19478
--- /dev/null
+++ b/alib2str/src/grammar/string/ContextFree/EpsilonFreeCFG.cxx
@@ -0,0 +1,18 @@
+/*
+ * EpsilonFreeCFG.cpp
+ *
+ * Created on: Sep 27, 2017
+ * Author: Jan Travnicek
+ */
+
+#include "EpsilonFreeCFG.h"
+#include <grammar/Grammar.h>
+
+#include <registration/StringRegistration.hpp>
+
+namespace {
+
+auto stringWriteEpsilonFreeCFG = registration::StringWriterRegister < grammar::EpsilonFreeCFG < > > ( );
+auto stringReaderEpsilonFreeCFG = registration::StringReaderRegister < grammar::Grammar, grammar::EpsilonFreeCFG < > > ( );
+
+} /* namespace */
diff --git a/alib2str/src/grammar/string/ContextFree/GNF.cpp b/alib2str/src/grammar/string/ContextFree/GNF.cxx
similarity index 52%
rename from alib2str/src/grammar/string/ContextFree/GNF.cpp
rename to alib2str/src/grammar/string/ContextFree/GNF.cxx
index 31dedaf57d..513835293c 100644
--- a/alib2str/src/grammar/string/ContextFree/GNF.cpp
+++ b/alib2str/src/grammar/string/ContextFree/GNF.cxx
@@ -12,7 +12,7 @@
 
 namespace {
 
-auto stringWrite = registration::StringWriterRegister < grammar::GNF < > > ( );
-auto stringReader = registration::StringReaderRegister < grammar::Grammar, grammar::GNF < > > ( );
+auto stringWriteGNF = registration::StringWriterRegister < grammar::GNF < > > ( );
+auto stringReaderGNF = registration::StringReaderRegister < grammar::Grammar, grammar::GNF < > > ( );
 
 } /* namespace */
diff --git a/alib2str/src/grammar/string/ContextFree/LG.cpp b/alib2str/src/grammar/string/ContextFree/LG.cxx
similarity index 52%
rename from alib2str/src/grammar/string/ContextFree/LG.cpp
rename to alib2str/src/grammar/string/ContextFree/LG.cxx
index daf5f290d2..dbd8ad749b 100644
--- a/alib2str/src/grammar/string/ContextFree/LG.cpp
+++ b/alib2str/src/grammar/string/ContextFree/LG.cxx
@@ -12,7 +12,7 @@
 
 namespace {
 
-auto stringWrite = registration::StringWriterRegister < grammar::LG < > > ( );
-auto stringReader = registration::StringReaderRegister < grammar::Grammar, grammar::LG < > > ( );
+auto stringWriteLG = registration::StringWriterRegister < grammar::LG < > > ( );
+auto stringReaderLG = registration::StringReaderRegister < grammar::Grammar, grammar::LG < > > ( );
 
 } /* namespace */
-- 
GitLab