1 // Copyright (c) 2001-2011 Hartmut Kaiser
2 // Copyright (c) 2011 Thomas Heller
4 // Distributed under the Boost Software License, Version 1.0. (See accompanying
5 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 #if !defined(SPIRIT_LEX_SUPPORT_FUNCTIONS_EXPRESSION_MAR_22_2011_0711PM)
8 #define SPIRIT_LEX_SUPPORT_FUNCTIONS_EXPRESSION_MAR_22_2011_0711PM
14 #include <boost/spirit/include/phoenix_core.hpp>
16 namespace boost { namespace spirit { namespace lex
18 template <typename> struct less_type;
20 template <typename, typename> struct lookahead_type;
23 ///////////////////////////////////////////////////////////////////////////////
25 BOOST_PHOENIX_DEFINE_EXPRESSION(
26 (boost)(spirit)(lex)(less)
27 , (boost::phoenix::meta_grammar)
30 BOOST_PHOENIX_DEFINE_EXPRESSION(
31 (boost)(spirit)(lex)(lookahead)
32 , (boost::phoenix::meta_grammar)
33 (boost::phoenix::meta_grammar)
36 namespace boost { namespace phoenix
42 struct is_nullary<custom_terminal<boost::spirit::lex::more_type> >
47 template <typename Dummy>
48 struct is_custom_terminal<boost::spirit::lex::more_type, Dummy> : mpl::true_ {};
50 template <typename Dummy>
51 struct custom_terminal<boost::spirit::lex::more_type, Dummy>
54 proto::make<boost::spirit::lex::more_type()>
55 , proto::call<functional::env(proto::_state)>
61 template <typename Dummy>
62 struct is_nullary::when<spirit::lex::rule::less, Dummy>
63 : proto::make<mpl::false_()>
66 template <typename Dummy>
67 struct default_actions::when<spirit::lex::rule::less, Dummy>
71 spirit::lex::less_type<proto::_child0>(proto::_child0)
78 template <typename Dummy>
79 struct is_nullary::when<spirit::lex::rule::lookahead, Dummy>
80 : proto::make<mpl::false_()>
83 template <typename Dummy>
84 struct default_actions::when<spirit::lex::rule::lookahead, Dummy>
88 spirit::lex::lookahead_type<