]> granicus.if.org Git - re2c/commitdiff
Renamed header and added forgotten function.
authorUlya Trofimovich <skvadrik@gmail.com>
Thu, 6 Oct 2016 13:05:34 +0000 (14:05 +0100)
committerUlya Trofimovich <skvadrik@gmail.com>
Thu, 6 Oct 2016 13:14:36 +0000 (14:14 +0100)
re2c/Makefile.am
re2c/src/codegen/emit_action.cc
re2c/src/codegen/emit_dfa.cc
re2c/src/codegen/input_api.cc
re2c/src/codegen/output.cc
re2c/src/util/string_utils.h [moved from re2c/src/util/strrreplace.h with 65% similarity]

index cc8a68dd466995953aefaa5ad4b8bb7583545aec..36b6ee66c128a4c7e19c3ab4301c179f60ca420b 100644 (file)
@@ -66,7 +66,7 @@ SRC_HDR = \
        src/util/s_to_n32_unsafe.h \
        src/util/smart_ptr.h \
        src/util/static_assert.h \
-       src/util/strrreplace.h \
+       src/util/string_utils.h \
        src/util/u32lim.h \
        src/util/uniq_vector.h
 SRC = \
index 3a3ce7200a0d1f4e1f289da579710ead7ed91d2e..bc5dc4be4b21aa222261c2338f059776191178c6 100644 (file)
@@ -14,8 +14,7 @@
 #include "src/ir/skeleton/skeleton.h"
 #include "src/parse/code.h"
 #include "src/parse/loc.h"
-#include "src/util/strrreplace.h"
-#include "src/util/to_string.h"
+#include "src/util/string_utils.h"
 
 namespace re2c
 {
index 454fefaa61781083dd5baeca50a18be9a9d18e87..ed5a741dac74b6b8dc51e9a0cf7e116d907bae43 100644 (file)
@@ -17,7 +17,7 @@
 #include "src/ir/adfa/adfa.h"
 #include "src/ir/skeleton/skeleton.h"
 #include "src/util/counter.h"
-#include "src/util/strrreplace.h"
+#include "src/util/string_utils.h"
 
 namespace re2c
 {
index 33cc54af35db6614d58137f0ebb2f061dfa05fcd..0135efd191eea06a2d46cb073d3587ae6d201a7f 100644 (file)
@@ -5,19 +5,12 @@
 #include "src/codegen/input_api.h"
 #include "src/codegen/indent.h"
 #include "src/conf/opt.h"
+#include "src/util/string_utils.h"
 #include "src/globals.h"
 
 namespace re2c
 {
 
-template<typename T>
-static std::string to_string(const T &v)
-{
-       std::ostringstream s;
-       s << v;
-       return s.str();
-}
-
 InputAPI::InputAPI ()
        : type_ (DEFAULT)
 {}
index b48e1d03d2c4dbafdfad0adaa1d5457ec62b3957..d49d8f31d780d561c7364f4a50578856e8c2e855 100644 (file)
@@ -8,7 +8,7 @@
 #include "src/conf/msg.h"
 #include "src/conf/opt.h"
 #include "src/conf/warn.h"
-#include "src/util/strrreplace.h"
+#include "src/util/string_utils.h"
 #include "src/globals.h"
 
 namespace re2c
similarity index 65%
rename from re2c/src/util/strrreplace.h
rename to re2c/src/util/string_utils.h
index 8a18fe81aee7fdcc6b66a77526720d62cbe2557b..65f6b85cabb91e6d82ac04003b1af19f360ef08c 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef _RE2C_UTIL_STRRREPLACE_
-#define _RE2C_UTIL_STRRREPLACE_
+#ifndef _RE2C_UTIL_STRING_UTILS_
+#define _RE2C_UTIL_STRING_UTILS_
 
 #include <sstream>
 #include <string>
@@ -24,6 +24,14 @@ template<typename type_t> void strrreplace(
        }
 }
 
+template<typename T>
+static std::string to_string(const T &v)
+{
+       std::ostringstream s;
+       s << v;
+       return s.str();
+}
+
 } // namespace re2c
 
-#endif // _RE2C_UTIL_STRRREPLACE_
+#endif // _RE2C_UTIL_STRING_UTILS_