OSDN Git Service

lexical/true_false_analyze.hpp への分離
authorMyun2 <myun2@nwhite.info>
Sat, 8 Jan 2011 19:27:08 +0000 (04:27 +0900)
committerMyun2 <myun2@nwhite.info>
Sat, 8 Jan 2011 19:27:08 +0000 (04:27 +0900)
roast/include/roast/lexical/lexical.hpp
roast/include/roast/lexical/rule.hpp
roast/include/roast/lexical/true_false_analyze.hpp [new file with mode: 0644]

index b8fb9e9..4954b96 100644 (file)
@@ -5,6 +5,7 @@
 #define __SFJP_ROAST__lexical__lexical_HPP__
 
 #include "roast/lexical/rule.hpp"
+#include "roast/lexical/true_false_analyze.hpp"
 
 #include "roast/lexical/seq.hpp"
 #include "roast/lexical/or.hpp"
index 883ceec..08800ac 100644 (file)
@@ -18,42 +18,6 @@ namespace roast
        {
                namespace rule
                {
-                       //////////////////////////////////////////////////////////////////////////////////
-
-                       class _true_analyze : public lengthable
-                       {
-                       public:
-                               static const int length = 0;
-
-                               template <typename _It, typename _Param>
-                               bool analyze(const _It&, const _Param&)
-                               {
-                                       return true;
-                               }
-                               template <typename _It, typename _Param>
-                               bool generate(const _It&, const _Param&)
-                               {
-                                       return true;
-                               }
-                       };
-
-                       class _false_analyze : public lengthable
-                       {
-                       public:
-                               static const int length = 0;
-
-                               template <typename _It, typename _Param>
-                               bool analyze(const _It&, const _Param&)
-                               {
-                                       return false;
-                               }
-                               template <typename _It, typename _Param>
-                               bool generate(const _It&, const _Param&)
-                               {
-                                       return false;
-                               }
-                       };
-
                        template <typename T>
                        class test : public lengthable
                        {
diff --git a/roast/include/roast/lexical/true_false_analyze.hpp b/roast/include/roast/lexical/true_false_analyze.hpp
new file mode 100644 (file)
index 0000000..63af407
--- /dev/null
@@ -0,0 +1,54 @@
+//     Roast+ License
+/*
+*/
+#ifndef __SFJP_ROAST__lexical__true_false_analyze_HPP__
+#define __SFJP_ROAST__lexical__true_false_analyze_HPP__
+
+namespace roast
+{
+       namespace lexical
+       {
+               namespace rule
+               {
+                       //////////////////////////////////////////////////////////////////////////////////
+
+                       class _true_analyze : public lengthable
+                       {
+                       public:
+                               static const int length = 0;
+
+                               template <typename _It, typename _Param>
+                               bool analyze(const _It&, const _Param&)
+                               {
+                                       return true;
+                               }
+                               template <typename _It, typename _Param>
+                               bool generate(const _It&, const _Param&)
+                               {
+                                       return true;
+                               }
+                       };
+
+                       class _false_analyze : public lengthable
+                       {
+                       public:
+                               static const int length = 0;
+
+                               template <typename _It, typename _Param>
+                               bool analyze(const _It&, const _Param&)
+                               {
+                                       return false;
+                               }
+                               template <typename _It, typename _Param>
+                               bool generate(const _It&, const _Param&)
+                               {
+                                       return false;
+                               }
+                       };
+                       
+                       //////////////////////////////////////////////////////////////////////////////////
+               }
+       }
+}
+
+#endif//__SFJP_ROAST__lexical__true_false_analyze_HPP__