Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r67080 - in sandbox/SOC/2010/phoenix3: boost/phoenix/core boost/phoenix/statement libs/phoenix/test/scope
From: thom.heller_at_[hidden]
Date: 2010-12-07 01:15:30


Author: theller
Date: 2010-12-07 01:15:28 EST (Tue, 07 Dec 2010)
New Revision: 67080
URL: http://svn.boost.org/trac/boost/changeset/67080

Log:
some tweaks
Text files modified:
   sandbox/SOC/2010/phoenix3/boost/phoenix/core/actor.hpp | 9 +++++++--
   sandbox/SOC/2010/phoenix3/boost/phoenix/core/domain.hpp | 12 +++++++-----
   sandbox/SOC/2010/phoenix3/boost/phoenix/core/is_nullary.hpp | 2 +-
   sandbox/SOC/2010/phoenix3/boost/phoenix/core/reference.hpp | 7 +++++++
   sandbox/SOC/2010/phoenix3/boost/phoenix/statement/try_catch.hpp | 12 ++++++++----
   sandbox/SOC/2010/phoenix3/libs/phoenix/test/scope/let_tests.cpp | 2 --
   6 files changed, 30 insertions(+), 14 deletions(-)

Modified: sandbox/SOC/2010/phoenix3/boost/phoenix/core/actor.hpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/boost/phoenix/core/actor.hpp (original)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/core/actor.hpp 2010-12-07 01:15:28 EST (Tue, 07 Dec 2010)
@@ -55,8 +55,7 @@
>
                       , mpl::identity<detail::error_expecting_arguments>
>
- {
- };
+ {};
 
         template <typename Expr>
         struct actor<Expr>
@@ -157,6 +156,12 @@
             typedef fusion::vector0<> args_type;
             args_type args;
             fusion::vector2<args_type&, default_actions> env(args, default_actions());
+
+ typedef typename proto::domain_of<actor<Expr> >::type domain_type;
+ typedef typename domain_type::proto_grammar grammar_type;
+
+ std::cout << typeid(actor<Expr>).name() << "\n";
+ std::cout << typeid(grammar_type).name() << "\n";
             
             return eval(*this, env);
         }

Modified: sandbox/SOC/2010/phoenix3/boost/phoenix/core/domain.hpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/boost/phoenix/core/domain.hpp (original)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/core/domain.hpp 2010-12-07 01:15:28 EST (Tue, 07 Dec 2010)
@@ -18,13 +18,15 @@
 {
     template <typename Expr>
     struct actor;
-
+
     struct meta_grammar;
-
+
     struct phoenix_domain
- : proto::domain<
- proto::pod_generator<actor>,
- proto::_, proto::default_domain>
+ : proto::domain<
+ proto::pod_generator<actor>
+ , meta_grammar//proto::_
+ , proto::default_domain
+ >
     {
         template <typename T>
         struct as_child : as_expr<T>

Modified: sandbox/SOC/2010/phoenix3/boost/phoenix/core/is_nullary.hpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/boost/phoenix/core/is_nullary.hpp (original)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/core/is_nullary.hpp 2010-12-07 01:15:28 EST (Tue, 07 Dec 2010)
@@ -43,7 +43,7 @@
 
                 template <typename Dummy>
                 struct is_nullary_::when<rule::custom_terminal, Dummy>
- : proto::lazy<is_nullary<custom_terminal<proto::_> >(proto::_, _env)>//proto::make<mpl::true_()>
+ : proto::lazy<is_nullary<custom_terminal<proto::_value> >(proto::_, _env)>//proto::make<mpl::true_()>
                 {};
 
                 template <typename Dummy>

Modified: sandbox/SOC/2010/phoenix3/boost/phoenix/core/reference.hpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/boost/phoenix/core/reference.hpp (original)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/core/reference.hpp 2010-12-07 01:15:28 EST (Tue, 07 Dec 2010)
@@ -69,6 +69,13 @@
             return r;
         }
     };
+
+ /*
+ template <typename T>
+ struct is_nullary<custom_terminal<reference_wrapper<T> > >
+ : proto::make<mpl::true_()>
+ {};
+ */
 }}
 
 #endif

Modified: sandbox/SOC/2010/phoenix3/boost/phoenix/statement/try_catch.hpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/boost/phoenix/statement/try_catch.hpp (original)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/statement/try_catch.hpp 2010-12-07 01:15:28 EST (Tue, 07 Dec 2010)
@@ -89,6 +89,10 @@
>
               , expression::try_catch<
                      meta_grammar
+ , rule::catch_all
+ >
+ , expression::try_catch<
+ meta_grammar
                    , proto::vararg<rule::catch_>
                    , rule::catch_all
>
@@ -173,14 +177,14 @@
         struct try_catch_is_nullary
             : proto::or_<
                 proto::when<
- rule::catch_
- , evaluator(proto::_child_c<1>, proto::_data)
- >
- , proto::when<
                     rule::catch_all
                   , evaluator(proto::_child_c<0>, proto::_data)
>
               , proto::when<
+ rule::catch_
+ , evaluator(proto::_child_c<1>, proto::_data)
+ >
+ , proto::when<
                     rule::try_catch
                   , mpl::and_<
                         evaluator(proto::_child_c<0>, proto::_data)

Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/test/scope/let_tests.cpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/test/scope/let_tests.cpp (original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/test/scope/let_tests.cpp 2010-12-07 01:15:28 EST (Tue, 07 Dec 2010)
@@ -135,7 +135,6 @@
         
         BOOST_TEST(x == 999);
 
- /*
         BOOST_TEST(
             let(_x = val(_1)) // _x holds x by value
             [
@@ -143,7 +142,6 @@
             ]
             (x) == x + 888
         );
- */
         
         BOOST_TEST(x == 999);
     }


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk