|
Boost-Commit : |
From: eric_at_[hidden]
Date: 2008-06-01 02:49:31
Author: eric_niebler
Date: 2008-06-01 02:49:30 EDT (Sun, 01 Jun 2008)
New Revision: 46005
URL: http://svn.boost.org/trac/boost/changeset/46005
Log:
misc bug fixes
Text files modified:
branches/proto/v4/boost/phoenix/core/actor.hpp | 27 ++++++++++++++++++++++++++-
branches/proto/v4/boost/phoenix/scope/lambda.hpp | 2 +-
branches/proto/v4/boost/phoenix/scope/let.hpp | 6 ++----
branches/proto/v4/boost/phoenix/scope/local_variable.hpp | 1 +
4 files changed, 30 insertions(+), 6 deletions(-)
Modified: branches/proto/v4/boost/phoenix/core/actor.hpp
==============================================================================
--- branches/proto/v4/boost/phoenix/core/actor.hpp (original)
+++ branches/proto/v4/boost/phoenix/core/actor.hpp 2008-06-01 02:49:30 EDT (Sun, 01 Jun 2008)
@@ -39,6 +39,31 @@
////////////////////////////////////////////////////////////////////////////////////////
template<typename SubGrammar = no_sub_grammar, typename X = proto::callable>
struct evaluator;
+
+ ////////////////////////////////////////////////////////////////////////////////////////
+ struct terminal_evaluator : proto::transform<terminal_evaluator>
+ {
+ template<typename Expr, typename State, typename Data>
+ struct impl : proto::transform_impl<Expr, State, Data>
+ {
+ typedef
+ typename impl::expr
+ expr;
+
+ typedef
+ typename expr::proto_child0
+ result_type;
+
+ result_type operator ()(
+ typename impl::expr_param expr
+ , typename impl::state_param
+ , typename impl::data_param
+ ) const
+ {
+ return expr.proto_base().child0;
+ }
+ };
+ };
}
using detail::evaluator;
@@ -50,7 +75,7 @@
////////////////////////////////////////////////////////////////////////////////////////////
template<typename Value, typename SubGrammar>
struct terminal_extension
- : proto::otherwise<proto::_value>
+ : proto::otherwise<detail::terminal_evaluator>
{};
////////////////////////////////////////////////////////////////////////////////////////////
Modified: branches/proto/v4/boost/phoenix/scope/lambda.hpp
==============================================================================
--- branches/proto/v4/boost/phoenix/scope/lambda.hpp (original)
+++ branches/proto/v4/boost/phoenix/scope/lambda.hpp 2008-06-01 02:49:30 EDT (Sun, 01 Jun 2008)
@@ -101,7 +101,7 @@
: proto::when<
proto::unary_expr<tag::lambda_, evaluator<SubGrammar> >
, proto::_make_expr<tag::with_state, detail::domain>(
- proto::call<proto::_make_expr<proto::tag::terminal, detail::domain>(proto::_state)>
+ proto::call<proto::_make_expr<proto::tag::terminal, detail::domain>(proto::_byval(proto::_state))>
, proto::_child
)
>
Modified: branches/proto/v4/boost/phoenix/scope/let.hpp
==============================================================================
--- branches/proto/v4/boost/phoenix/scope/let.hpp (original)
+++ branches/proto/v4/boost/phoenix/scope/let.hpp 2008-06-01 02:49:30 EDT (Sun, 01 Jun 2008)
@@ -115,15 +115,13 @@
>::type
>::type
locals_type;
-
+
scope(Map map, State state, Data data)
: state(state)
- , data(data)
, locals(fusion::as_map(fusion::transform(map, initialize_locals<State, Data, SubGrammar>(state, data))))
{}
- State state; // outer state
- Data data; // outer data
+ state_type state; // outer state
mutable locals_type locals; // Local variables
};
Modified: branches/proto/v4/boost/phoenix/scope/local_variable.hpp
==============================================================================
--- branches/proto/v4/boost/phoenix/scope/local_variable.hpp (original)
+++ branches/proto/v4/boost/phoenix/scope/local_variable.hpp 2008-06-01 02:49:30 EDT (Sun, 01 Jun 2008)
@@ -34,6 +34,7 @@
struct find_local
{
typedef
+ //typename fusion::result_of::value_at_key<typename State::locals_type, Tag>::type
typename fusion::result_of::at_key<typename State::locals_type, Tag>::type
result_type;
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