1 /*============================================================================= 2 Copyright (c) 2005-2010 Joel de Guzman 3 Copyright (c) 2010 Eric Niebler 4 5 Distributed under the Boost Software License, Version 1.0. (See accompanying 6 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 7 ==============================================================================*/ 8 #ifndef BOOST_PHOENIX_CORE_DOMAIN_HPP 9 #define BOOST_PHOENIX_CORE_DOMAIN_HPP 10 11 #include <boost/phoenix/core/limits.hpp> 12 #include <boost/proto/matches.hpp> 13 #include <boost/proto/transform/call.hpp> 14 #include <boost/proto/transform/when.hpp> 15 #include <boost/proto/domain.hpp> 16 17 namespace boost { namespace phoenix 18 { 19 template <typename Expr> 20 struct actor; 21 22 struct meta_grammar; 23 24 struct phoenix_generator 25 : proto::switch_<phoenix_generator> 26 { 27 28 BOOST_PROTO_USE_BASIC_EXPR() 29 30 template<typename Tag> 31 struct case_ 32 : proto::otherwise<proto::call<proto::pod_generator<actor>(proto::_)> > 33 {}; 34 }; 35 36 struct phoenix_default_domain 37 : proto::domain< 38 proto::basic_default_generator 39 , proto::_ 40 , proto::basic_default_domain 41 > 42 { 43 template <typename T> 44 struct as_child 45 //: proto_base_domain::as_expr<T> // proto lambda example. 46 : as_expr<T> 47 {}; 48 }; 49 50 struct phoenix_domain 51 : proto::domain< 52 phoenix_generator 53 , meta_grammar 54 , proto::basic_default_domain 55 > 56 { 57 template <typename T> 58 struct as_child 59 //: proto_base_domain::as_expr<T> // proto lambda example. 60 : as_expr<T> 61 {}; 62 }; 63 }} 64 65 #endif 66