/usr/include/boost/phoenix/core
Edit: /usr/include/boost/phoenix/core/terminal.hpp (5124B)
/*==============================================================================
Copyright (c) 2005-2010 Joel de Guzman
Copyright (c) 2010 Thomas Heller
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#ifndef BOOST_PHOENIX_CORE_TERMINAL_HPP
#define BOOST_PHOENIX_CORE_TERMINAL_HPP
#include
#include
#include
#include
#include
#include
#include
#include
#include
#define BOOST_PHOENIX_DEFINE_CUSTOM_TERMINAL(Template, Terminal, IsNullary, EvalFun)\
namespace boost { namespace phoenix \
{ \
namespace result_of \
{ \
Template \
struct is_nullary< \
custom_terminal< \
Terminal \
> \
> \
: IsNullary \
{}; \
} \
Template \
struct is_custom_terminal: mpl::true_ {}; \
\
Template \
struct custom_terminal : proto::call {}; \
}} \
/**/
namespace boost { namespace phoenix
{
template
struct is_custom_terminal
: mpl::false_ {};
template
struct custom_terminal;
namespace tag {
struct terminal /*: public proto::tag::terminal */ {};
}
namespace expression
{
template class Actor = actor>
struct terminal
: proto::terminal
{
typedef
proto::basic_expr<
proto::tag::terminal
// tag::terminal //cannot change to use phoenix tag - breaks code.
, proto::term
, 0
>
base_type;
typedef Actor type;
static const type make(T const& t)
{
// ?? Should the next line be Actor not actor which is the default?
actor const e = {base_type::make(t)};
//Actor const e = {base_type::make(t)};
return e;
}
};
}
namespace rule
{
struct argument
: proto::if_()>
{};
struct custom_terminal
: proto::if_()>
{};
struct terminal
: proto::terminal
{};
}
template
struct meta_grammar::case_
: proto::or_<
enable_rule
, enable_rule
, enable_rule
>
{};
template
struct default_actions::when
: proto::lazy<
custom_terminal(
proto::_value
, _context
)
>
{};
namespace detail
{
template
struct placeholder_idx
: mpl::int_
{};
}
template
struct default_actions::when
: proto::call<
proto::functional::at(
_env
, proto::make<
detail::placeholder_idx<
proto::make<
boost::is_placeholder()
>
>()
>
)
>
{};
}}
#endif