OSDN Git Service

lexical/rule.hpp: zeroterm追加。あとまだanalyze()にtypename Tがあったので直し
authorMyun2 <myun2@nwhite.info>
Mon, 11 Oct 2010 06:02:16 +0000 (15:02 +0900)
committerMyun2 <myun2@nwhite.info>
Mon, 11 Oct 2010 06:02:16 +0000 (15:02 +0900)
roast/include/roast/lexical/rule.hpp

index df107fc..7b9cf4e 100644 (file)
@@ -771,7 +771,7 @@ namespace roast
                                static const int length = sizeof(T);
 
                                template <typename _It, typename _Param>
-                               bool analyze(T& it, _Param& param)
+                               bool analyze(_It& it, _Param& param)
                                {
                                        T n = *it;
                                        if ( n >= _Min && n <= _Max )
@@ -851,7 +851,7 @@ namespace roast
                                static const int length = sizeof(T);
 
                                template <typename _It, typename _Param>
-                               bool analyze(T& it, _Param& param)
+                               bool analyze(_It& it, _Param& param)
                                {
                                        switch(*it)
                                        {
@@ -891,7 +891,7 @@ namespace roast
                        {
                        public:
                                template <typename _It, typename _Param>
-                               bool analyze(T& it, _Param& param)
+                               bool analyze(_It& it, _Param& param)
                                {
                                        switch(*it)
                                        {
@@ -931,6 +931,8 @@ namespace roast
                        template <unsigned long _Val>
                        class fixed_ulong : public fixed_numeric<unsigned long, _Val> {};
 
+                       typedef unibyte<0> zeroterm;
+
                        /////////////////////////////////////////////////////////////
 
                        class illegal_terminated : public lexical_exception