]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/spirit/include/boost/spirit/home/lex/lexer/support_functions_expression.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / spirit / include / boost / spirit / home / lex / lexer / support_functions_expression.hpp
CommitLineData
7c673cae
FG
1// Copyright (c) 2001-2011 Hartmut Kaiser
2// Copyright (c) 2011 Thomas Heller
3//
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)
6
7#if !defined(SPIRIT_LEX_SUPPORT_FUNCTIONS_EXPRESSION_MAR_22_2011_0711PM)
8#define SPIRIT_LEX_SUPPORT_FUNCTIONS_EXPRESSION_MAR_22_2011_0711PM
9
10#if defined(_MSC_VER)
11#pragma once
12#endif
13
14#include <boost/spirit/include/phoenix_core.hpp>
15
16namespace boost { namespace spirit { namespace lex
17{
18 template <typename> struct less_type;
19 struct more_type;
20 template <typename, typename> struct lookahead_type;
21}}}
22
23///////////////////////////////////////////////////////////////////////////////
24
25BOOST_PHOENIX_DEFINE_EXPRESSION(
26 (boost)(spirit)(lex)(less)
27 , (boost::phoenix::meta_grammar)
28)
29
30BOOST_PHOENIX_DEFINE_EXPRESSION(
31 (boost)(spirit)(lex)(lookahead)
32 , (boost::phoenix::meta_grammar)
33 (boost::phoenix::meta_grammar)
34)
35
36namespace boost { namespace phoenix
37{
38
39 namespace result_of
40 {
41 template <>
42 struct is_nullary<custom_terminal<boost::spirit::lex::more_type> >
43 : mpl::false_
44 {};
45 }
46
47 template <typename Dummy>
48 struct is_custom_terminal<boost::spirit::lex::more_type, Dummy> : mpl::true_ {};
49
50 template <typename Dummy>
51 struct custom_terminal<boost::spirit::lex::more_type, Dummy>
52 : proto::call<
53 v2_eval(
54 proto::make<boost::spirit::lex::more_type()>
55 , proto::call<functional::env(proto::_state)>
56 )
57 >
58 {};
59
60
61 template <typename Dummy>
62 struct is_nullary::when<spirit::lex::rule::less, Dummy>
63 : proto::make<mpl::false_()>
64 {};
65
66 template <typename Dummy>
67 struct default_actions::when<spirit::lex::rule::less, Dummy>
68 : proto::call<
69 v2_eval(
70 proto::make<
71 spirit::lex::less_type<proto::_child0>(proto::_child0)
72 >
73 , _env
74 )
75 >
76 {};
77
78 template <typename Dummy>
79 struct is_nullary::when<spirit::lex::rule::lookahead, Dummy>
80 : proto::make<mpl::false_()>
81 {};
82
83 template <typename Dummy>
84 struct default_actions::when<spirit::lex::rule::lookahead, Dummy>
85 : proto::call<
86 v2_eval(
87 proto::make<
88 spirit::lex::lookahead_type<
89 proto::_child0
90 , proto::_child1
91 >(
92 proto::_child0
93 , proto::_child1
94 )
95 >
96 , _env
97 )
98 >
99 {};
100}}
101
102#endif