Update of /cvsroot/boost/boost/boost/xpressive/detail/static/productions
In directory 
sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2563/detail/static/productions

Modified Files:
        marker_transform.hpp quant_transforms.hpp 
Log Message:
arg, left, and right_transform do the obvious things; misc clean-up using 
proto::matches to implement is_marker and is_repeater predicates

Index: marker_transform.hpp
===================================================================
RCS file: 
/cvsroot/boost/boost/boost/xpressive/detail/static/productions/marker_transform.hpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- marker_transform.hpp        1 Dec 2006 05:46:05 -0000       1.13
+++ marker_transform.hpp        13 Dec 2006 02:29:55 -0000      1.14
@@ -18,19 +18,10 @@
 namespace boost { namespace xpressive { namespace detail
 {
     
///////////////////////////////////////////////////////////////////////////////
-    // is_marker
+    // MarkerPattern
     // (s1= ...) is a marker
-    template<typename Expr, long Arity = Expr::arity::value>
-    struct is_marker
-      : mpl::false_
-    {};
-
-    template<typename Expr>
-    struct is_marker<Expr, 2>
-      : mpl::and_<
-            is_same<proto::tag::assign, typename Expr::tag_type>
-          , is_same<basic_mark_tag, typename proto::meta::unref<typename 
Expr::arg0_type>::type>
-        >
+    struct MarkerPattern
+      : proto::meta::assign<basic_mark_tag, mpl::_>
     {};
 
     
///////////////////////////////////////////////////////////////////////////////
@@ -39,7 +30,7 @@
     {
         template<typename Expr, typename, typename>
         struct apply
-          : is_marker<Expr>
+          : proto::matches<Expr, MarkerPattern>
         {};
     };
 
@@ -96,7 +87,7 @@
         {
             return marker_insert_transform::call
             (
-                expr.cast().arg1 //proto::right(expr)
+                proto::right(expr)
               , state
               , visitor
               , proto::arg(proto::left(expr)).mark_number_

Index: quant_transforms.hpp
===================================================================
RCS file: 
/cvsroot/boost/boost/boost/xpressive/detail/static/productions/quant_transforms.hpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- quant_transforms.hpp        10 Nov 2006 04:09:38 -0000      1.12
+++ quant_transforms.hpp        13 Dec 2006 02:29:55 -0000      1.13
@@ -1,4 +1,5 @@
-///////////////////////////////////////////////////////////////////////////////
+/////////
+//////////////////////////////////////////////////////////////////////
 // quant_transforms.hpp
 //
 //  Copyright 2004 Eric Niebler. Distributed under the Boost
@@ -20,16 +21,10 @@
 
 namespace boost { namespace xpressive { namespace detail
 {
-    typedef proto::meta::terminal<repeat_begin_matcher>::type repeat_tag;
-
     
///////////////////////////////////////////////////////////////////////////////
-    // is_repeater
-    template<typename Expr>
-    struct is_repeater
-      : is_same<
-            repeat_tag
-          , typename proto::meta::unref<typename Expr::arg0_type>::type
-        >
+    // RepeaterPattern
+    struct RepeaterPattern
+      : proto::meta::right_shift<proto::meta::terminal<repeat_begin_matcher>, 
mpl::_>
     {};
 
     
///////////////////////////////////////////////////////////////////////////////
@@ -38,10 +33,8 @@
     {
         template<typename Expr, typename, typename>
         struct apply
-        {
-            typedef typename Expr::arg0_type expr_type;
-            typedef typename mpl::or_<is_marker<expr_type>, 
is_repeater<expr_type> >::type type;
-        };
+          : proto::matches<typename Expr::arg0_type, proto::or_<MarkerPattern, 
RepeaterPattern> >
+        {};
     };
 
     
///////////////////////////////////////////////////////////////////////////////


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs

Reply via email to