]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/spirit/home/classic/utility/grammar_def_fwd.hpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / boost / spirit / home / classic / utility / grammar_def_fwd.hpp
1 /*=============================================================================
2 Copyright (c) 2006 Tobias Schwinger
3 http://spirit.sourceforge.net/
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 #if !defined(BOOST_SPIRIT_GRAMMAR_DEF_FWD_HPP)
9 #define BOOST_SPIRIT_GRAMMAR_DEF_FWD_HPP
10
11 #include <boost/spirit/home/classic/namespace.hpp>
12 #include <boost/spirit/home/classic/phoenix/tuples.hpp>
13
14 #include <boost/preprocessor/repetition/enum_binary_params.hpp>
15 #include <boost/preprocessor/facilities/intercept.hpp>
16
17 #if !defined(BOOST_SPIRIT_GRAMMAR_STARTRULE_TYPE_LIMIT)
18 #define BOOST_SPIRIT_GRAMMAR_STARTRULE_TYPE_LIMIT PHOENIX_LIMIT
19 #endif
20
21 // Calculate an integer rounded up to the nearest integer dividable by 3
22 #if BOOST_SPIRIT_GRAMMAR_STARTRULE_TYPE_LIMIT > 12
23 #define BOOST_SPIRIT_GRAMMAR_STARTRULE_TYPE_LIMIT_A 15
24 #elif BOOST_SPIRIT_GRAMMAR_STARTRULE_TYPE_LIMIT > 9
25 #define BOOST_SPIRIT_GRAMMAR_STARTRULE_TYPE_LIMIT_A 12
26 #elif BOOST_SPIRIT_GRAMMAR_STARTRULE_TYPE_LIMIT > 6
27 #define BOOST_SPIRIT_GRAMMAR_STARTRULE_TYPE_LIMIT_A 9
28 #elif BOOST_SPIRIT_GRAMMAR_STARTRULE_TYPE_LIMIT > 3
29 #define BOOST_SPIRIT_GRAMMAR_STARTRULE_TYPE_LIMIT_A 6
30 #else
31 #define BOOST_SPIRIT_GRAMMAR_STARTRULE_TYPE_LIMIT_A 3
32 #endif
33
34 namespace boost { namespace spirit {
35
36 BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN
37
38 template <
39 typename T,
40 BOOST_PP_ENUM_BINARY_PARAMS(
41 BOOST_PP_DEC(BOOST_SPIRIT_GRAMMAR_STARTRULE_TYPE_LIMIT_A),
42 typename T, = ::phoenix::nil_t BOOST_PP_INTERCEPT
43 )
44 >
45 class grammar_def;
46
47 BOOST_SPIRIT_CLASSIC_NAMESPACE_END
48
49 }} // namespace BOOST_SPIRIT_CLASSIC_NS
50
51 #endif
52