sl@0
|
1 |
/*=============================================================================
|
sl@0
|
2 |
Copyright (c) 2001-2003 Joel de Guzman
|
sl@0
|
3 |
Copyright (c) 2002-2003 Hartmut Kaiser
|
sl@0
|
4 |
http://spirit.sourceforge.net/
|
sl@0
|
5 |
|
sl@0
|
6 |
Use, modification and distribution is subject to the Boost Software
|
sl@0
|
7 |
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
sl@0
|
8 |
http://www.boost.org/LICENSE_1_0.txt)
|
sl@0
|
9 |
=============================================================================*/
|
sl@0
|
10 |
#ifndef BOOST_SPIRIT_CLOSURE_HPP
|
sl@0
|
11 |
#define BOOST_SPIRIT_CLOSURE_HPP
|
sl@0
|
12 |
|
sl@0
|
13 |
///////////////////////////////////////////////////////////////////////////////
|
sl@0
|
14 |
#include <boost/spirit/core/parser.hpp>
|
sl@0
|
15 |
#include <boost/spirit/core/composite/composite.hpp>
|
sl@0
|
16 |
#include <boost/spirit/core/non_terminal/parser_context.hpp>
|
sl@0
|
17 |
#include <boost/spirit/attribute/parametric.hpp>
|
sl@0
|
18 |
#include <boost/spirit/attribute/closure_context.hpp>
|
sl@0
|
19 |
#include <boost/spirit/attribute/closure_fwd.hpp>
|
sl@0
|
20 |
|
sl@0
|
21 |
#include <boost/spirit/phoenix/closures.hpp>
|
sl@0
|
22 |
#include <boost/spirit/phoenix/primitives.hpp>
|
sl@0
|
23 |
#include <boost/spirit/phoenix/casts.hpp>
|
sl@0
|
24 |
#include <boost/spirit/phoenix/operators.hpp>
|
sl@0
|
25 |
#include <boost/spirit/phoenix/tuple_helpers.hpp>
|
sl@0
|
26 |
|
sl@0
|
27 |
#include <boost/static_assert.hpp>
|
sl@0
|
28 |
|
sl@0
|
29 |
///////////////////////////////////////////////////////////////////////////////
|
sl@0
|
30 |
//
|
sl@0
|
31 |
// Spirit predefined maximum closure limit. This limit defines the maximum
|
sl@0
|
32 |
// number of elements a closure can hold. This number defaults to 3. The
|
sl@0
|
33 |
// actual maximum is rounded up in multiples of 3. Thus, if this value
|
sl@0
|
34 |
// is 4, the actual limit is 6. The ultimate maximum limit in this
|
sl@0
|
35 |
// implementation is 15.
|
sl@0
|
36 |
//
|
sl@0
|
37 |
// It should NOT be greater than PHOENIX_LIMIT!
|
sl@0
|
38 |
//
|
sl@0
|
39 |
///////////////////////////////////////////////////////////////////////////////
|
sl@0
|
40 |
|
sl@0
|
41 |
#if !defined(BOOST_SPIRIT_CLOSURE_LIMIT)
|
sl@0
|
42 |
#define BOOST_SPIRIT_CLOSURE_LIMIT PHOENIX_LIMIT
|
sl@0
|
43 |
#endif
|
sl@0
|
44 |
|
sl@0
|
45 |
///////////////////////////////////////////////////////////////////////////////
|
sl@0
|
46 |
//
|
sl@0
|
47 |
// ensure BOOST_SPIRIT_CLOSURE_LIMIT <= PHOENIX_LIMIT and SPIRIT_CLOSURE_LIMIT <= 15
|
sl@0
|
48 |
//
|
sl@0
|
49 |
///////////////////////////////////////////////////////////////////////////////
|
sl@0
|
50 |
BOOST_STATIC_ASSERT(BOOST_SPIRIT_CLOSURE_LIMIT <= PHOENIX_LIMIT);
|
sl@0
|
51 |
BOOST_STATIC_ASSERT(BOOST_SPIRIT_CLOSURE_LIMIT <= 15);
|
sl@0
|
52 |
|
sl@0
|
53 |
///////////////////////////////////////////////////////////////////////////////
|
sl@0
|
54 |
namespace boost { namespace spirit {
|
sl@0
|
55 |
|
sl@0
|
56 |
///////////////////////////////////////////////////////////////////////////
|
sl@0
|
57 |
//
|
sl@0
|
58 |
// closure_context class
|
sl@0
|
59 |
//
|
sl@0
|
60 |
///////////////////////////////////////////////////////////////////////////
|
sl@0
|
61 |
template <typename ClosureT>
|
sl@0
|
62 |
class closure_context : public parser_context_base
|
sl@0
|
63 |
{
|
sl@0
|
64 |
public:
|
sl@0
|
65 |
|
sl@0
|
66 |
typedef typename phoenix::tuple_element<0,
|
sl@0
|
67 |
typename ClosureT::tuple_t>::type attr_t;
|
sl@0
|
68 |
typedef ClosureT base_t;
|
sl@0
|
69 |
typedef closure_context_linker<closure_context<ClosureT> >
|
sl@0
|
70 |
context_linker_t;
|
sl@0
|
71 |
|
sl@0
|
72 |
closure_context(ClosureT const& clos)
|
sl@0
|
73 |
: frame(clos) {}
|
sl@0
|
74 |
|
sl@0
|
75 |
~closure_context() {}
|
sl@0
|
76 |
|
sl@0
|
77 |
template <typename ParserT, typename ScannerT>
|
sl@0
|
78 |
void pre_parse(ParserT const&, ScannerT const&) {}
|
sl@0
|
79 |
|
sl@0
|
80 |
template <typename ResultT, typename ParserT, typename ScannerT>
|
sl@0
|
81 |
ResultT& post_parse(ResultT& hit, ParserT const&, ScannerT const&)
|
sl@0
|
82 |
{ hit.value(frame[phoenix::tuple_index<0>()]); return hit; }
|
sl@0
|
83 |
|
sl@0
|
84 |
private:
|
sl@0
|
85 |
|
sl@0
|
86 |
phoenix::closure_frame<typename ClosureT::phoenix_closure_t> frame;
|
sl@0
|
87 |
};
|
sl@0
|
88 |
|
sl@0
|
89 |
///////////////////////////////////////////////////////////////////////////
|
sl@0
|
90 |
//
|
sl@0
|
91 |
// init_closure_context class
|
sl@0
|
92 |
//
|
sl@0
|
93 |
// The init_closure_context class is a special parser context type
|
sl@0
|
94 |
// which additionally initializes a closure contained in the derived
|
sl@0
|
95 |
// parser with values from a given tuple. Please note, that this
|
sl@0
|
96 |
// given tuple does not contain the required values directly, it
|
sl@0
|
97 |
// contains phoenix::actor objects. These actors have to be
|
sl@0
|
98 |
// dereferenced to gain the values to be used for initialization
|
sl@0
|
99 |
// (this is done by the help of the phoenix::convert_actors<>
|
sl@0
|
100 |
// template).
|
sl@0
|
101 |
//
|
sl@0
|
102 |
///////////////////////////////////////////////////////////////////////////
|
sl@0
|
103 |
|
sl@0
|
104 |
template <typename ClosureT>
|
sl@0
|
105 |
class init_closure_context : public parser_context_base
|
sl@0
|
106 |
{
|
sl@0
|
107 |
typedef typename ClosureT::tuple_t tuple_t;
|
sl@0
|
108 |
typedef typename ClosureT::closure_t closure_t;
|
sl@0
|
109 |
|
sl@0
|
110 |
public:
|
sl@0
|
111 |
|
sl@0
|
112 |
init_closure_context(ClosureT const& clos)
|
sl@0
|
113 |
: frame(clos.subject(), phoenix::convert_actors<tuple_t>(clos.init)) {}
|
sl@0
|
114 |
|
sl@0
|
115 |
~init_closure_context() {}
|
sl@0
|
116 |
|
sl@0
|
117 |
template <typename ParserT, typename ScannerT>
|
sl@0
|
118 |
void pre_parse(ParserT const& /*p*/, ScannerT const&) {}
|
sl@0
|
119 |
|
sl@0
|
120 |
template <typename ResultT, typename ParserT, typename ScannerT>
|
sl@0
|
121 |
ResultT& post_parse(ResultT& hit, ParserT const&, ScannerT const&)
|
sl@0
|
122 |
{ hit.value(frame[phoenix::tuple_index<0>()]); return hit; }
|
sl@0
|
123 |
|
sl@0
|
124 |
private:
|
sl@0
|
125 |
|
sl@0
|
126 |
phoenix::closure_frame<closure_t> frame;
|
sl@0
|
127 |
};
|
sl@0
|
128 |
|
sl@0
|
129 |
///////////////////////////////////////////////////////////////////////////
|
sl@0
|
130 |
//
|
sl@0
|
131 |
// init_closure_parser class
|
sl@0
|
132 |
//
|
sl@0
|
133 |
///////////////////////////////////////////////////////////////////////////
|
sl@0
|
134 |
template <typename ParserT, typename ActorTupleT>
|
sl@0
|
135 |
struct init_closure_parser
|
sl@0
|
136 |
: public unary<ParserT, parser<init_closure_parser<ParserT, ActorTupleT> > >
|
sl@0
|
137 |
{
|
sl@0
|
138 |
typedef init_closure_parser<ParserT, ActorTupleT> self_t;
|
sl@0
|
139 |
typedef unary<ParserT, parser<self_t> > base_t;
|
sl@0
|
140 |
typedef typename ParserT::phoenix_closure_t closure_t;
|
sl@0
|
141 |
typedef typename ParserT::tuple_t tuple_t;
|
sl@0
|
142 |
typedef typename phoenix::tuple_element<0, tuple_t>::type attr_t;
|
sl@0
|
143 |
|
sl@0
|
144 |
template <typename ScannerT>
|
sl@0
|
145 |
struct result
|
sl@0
|
146 |
{
|
sl@0
|
147 |
typedef typename match_result<ScannerT, attr_t>::type type;
|
sl@0
|
148 |
};
|
sl@0
|
149 |
|
sl@0
|
150 |
init_closure_parser(ParserT const& p, ActorTupleT const& init_)
|
sl@0
|
151 |
: base_t(p), init(init_) {}
|
sl@0
|
152 |
|
sl@0
|
153 |
template <typename ScannerT>
|
sl@0
|
154 |
typename parser_result<self_t, ScannerT>::type
|
sl@0
|
155 |
parse_main(ScannerT const& scan) const
|
sl@0
|
156 |
{
|
sl@0
|
157 |
return this->subject().parse_main(scan);
|
sl@0
|
158 |
}
|
sl@0
|
159 |
|
sl@0
|
160 |
template <typename ScannerT>
|
sl@0
|
161 |
typename parser_result<self_t, ScannerT>::type
|
sl@0
|
162 |
parse(ScannerT const& scan) const
|
sl@0
|
163 |
{
|
sl@0
|
164 |
typedef init_closure_context<self_t> init_context_t;
|
sl@0
|
165 |
typedef parser_scanner_linker<ScannerT> scanner_t;
|
sl@0
|
166 |
typedef closure_context_linker<init_context_t> context_t;
|
sl@0
|
167 |
typedef typename parser_result<self_t, ScannerT>::type result_t;
|
sl@0
|
168 |
BOOST_SPIRIT_CONTEXT_PARSE(
|
sl@0
|
169 |
scan, *this, scanner_t, context_t, result_t);
|
sl@0
|
170 |
}
|
sl@0
|
171 |
|
sl@0
|
172 |
ActorTupleT init;
|
sl@0
|
173 |
};
|
sl@0
|
174 |
|
sl@0
|
175 |
///////////////////////////////////////////////////////////////////////////
|
sl@0
|
176 |
//
|
sl@0
|
177 |
// closure class
|
sl@0
|
178 |
//
|
sl@0
|
179 |
///////////////////////////////////////////////////////////////////////////
|
sl@0
|
180 |
template <
|
sl@0
|
181 |
typename DerivedT
|
sl@0
|
182 |
, typename T0
|
sl@0
|
183 |
, typename T1
|
sl@0
|
184 |
, typename T2
|
sl@0
|
185 |
|
sl@0
|
186 |
#if BOOST_SPIRIT_CLOSURE_LIMIT > 3
|
sl@0
|
187 |
, typename T3
|
sl@0
|
188 |
, typename T4
|
sl@0
|
189 |
, typename T5
|
sl@0
|
190 |
|
sl@0
|
191 |
#if BOOST_SPIRIT_CLOSURE_LIMIT > 6
|
sl@0
|
192 |
, typename T6
|
sl@0
|
193 |
, typename T7
|
sl@0
|
194 |
, typename T8
|
sl@0
|
195 |
|
sl@0
|
196 |
#if BOOST_SPIRIT_CLOSURE_LIMIT > 9
|
sl@0
|
197 |
, typename T9
|
sl@0
|
198 |
, typename T10
|
sl@0
|
199 |
, typename T11
|
sl@0
|
200 |
|
sl@0
|
201 |
#if BOOST_SPIRIT_CLOSURE_LIMIT > 12
|
sl@0
|
202 |
, typename T12
|
sl@0
|
203 |
, typename T13
|
sl@0
|
204 |
, typename T14
|
sl@0
|
205 |
#endif
|
sl@0
|
206 |
#endif
|
sl@0
|
207 |
#endif
|
sl@0
|
208 |
#endif
|
sl@0
|
209 |
>
|
sl@0
|
210 |
struct closure :
|
sl@0
|
211 |
public phoenix::closure<
|
sl@0
|
212 |
T0, T1, T2
|
sl@0
|
213 |
#if BOOST_SPIRIT_CLOSURE_LIMIT > 3
|
sl@0
|
214 |
, T3, T4, T5
|
sl@0
|
215 |
#if BOOST_SPIRIT_CLOSURE_LIMIT > 6
|
sl@0
|
216 |
, T6, T7, T8
|
sl@0
|
217 |
#if BOOST_SPIRIT_CLOSURE_LIMIT > 9
|
sl@0
|
218 |
, T9, T10, T11
|
sl@0
|
219 |
#if BOOST_SPIRIT_CLOSURE_LIMIT > 12
|
sl@0
|
220 |
, T12, T13, T14
|
sl@0
|
221 |
#endif
|
sl@0
|
222 |
#endif
|
sl@0
|
223 |
#endif
|
sl@0
|
224 |
#endif
|
sl@0
|
225 |
>
|
sl@0
|
226 |
{
|
sl@0
|
227 |
typedef phoenix::closure<
|
sl@0
|
228 |
T0, T1, T2
|
sl@0
|
229 |
#if BOOST_SPIRIT_CLOSURE_LIMIT > 3
|
sl@0
|
230 |
, T3, T4, T5
|
sl@0
|
231 |
#if BOOST_SPIRIT_CLOSURE_LIMIT > 6
|
sl@0
|
232 |
, T6, T7, T8
|
sl@0
|
233 |
#if BOOST_SPIRIT_CLOSURE_LIMIT > 9
|
sl@0
|
234 |
, T9, T10, T11
|
sl@0
|
235 |
#if BOOST_SPIRIT_CLOSURE_LIMIT > 12
|
sl@0
|
236 |
, T12, T13, T14
|
sl@0
|
237 |
#endif
|
sl@0
|
238 |
#endif
|
sl@0
|
239 |
#endif
|
sl@0
|
240 |
#endif
|
sl@0
|
241 |
> phoenix_closure_t;
|
sl@0
|
242 |
|
sl@0
|
243 |
typedef closure_context<DerivedT> context_t;
|
sl@0
|
244 |
|
sl@0
|
245 |
template <typename DerivedT2>
|
sl@0
|
246 |
struct aux
|
sl@0
|
247 |
{
|
sl@0
|
248 |
DerivedT2& aux_derived()
|
sl@0
|
249 |
{ return *static_cast<DerivedT2*>(this); }
|
sl@0
|
250 |
|
sl@0
|
251 |
DerivedT2 const& aux_derived() const
|
sl@0
|
252 |
{ return *static_cast<DerivedT2 const*>(this); }
|
sl@0
|
253 |
|
sl@0
|
254 |
// initialization functions
|
sl@0
|
255 |
template <typename A>
|
sl@0
|
256 |
init_closure_parser<
|
sl@0
|
257 |
DerivedT2,
|
sl@0
|
258 |
phoenix::tuple<
|
sl@0
|
259 |
typename phoenix::as_actor<A>::type
|
sl@0
|
260 |
>
|
sl@0
|
261 |
>
|
sl@0
|
262 |
operator()(A const &a) const
|
sl@0
|
263 |
{
|
sl@0
|
264 |
typedef typename phoenix::as_actor<A>::type a_t;
|
sl@0
|
265 |
typedef phoenix::tuple<a_t> actor_tuple_t;
|
sl@0
|
266 |
|
sl@0
|
267 |
return init_closure_parser<DerivedT2, actor_tuple_t>(
|
sl@0
|
268 |
aux_derived(),
|
sl@0
|
269 |
actor_tuple_t(
|
sl@0
|
270 |
phoenix::as_actor<A>::convert(a)
|
sl@0
|
271 |
)
|
sl@0
|
272 |
);
|
sl@0
|
273 |
}
|
sl@0
|
274 |
|
sl@0
|
275 |
template <typename A, typename B>
|
sl@0
|
276 |
init_closure_parser<
|
sl@0
|
277 |
DerivedT2,
|
sl@0
|
278 |
phoenix::tuple<
|
sl@0
|
279 |
typename phoenix::as_actor<A>::type,
|
sl@0
|
280 |
typename phoenix::as_actor<B>::type
|
sl@0
|
281 |
>
|
sl@0
|
282 |
>
|
sl@0
|
283 |
operator()(A const &a, B const &b) const
|
sl@0
|
284 |
{
|
sl@0
|
285 |
typedef typename phoenix::as_actor<A>::type a_t;
|
sl@0
|
286 |
typedef typename phoenix::as_actor<B>::type b_t;
|
sl@0
|
287 |
typedef phoenix::tuple<a_t, b_t> actor_tuple_t;
|
sl@0
|
288 |
|
sl@0
|
289 |
return init_closure_parser<DerivedT2, actor_tuple_t>(
|
sl@0
|
290 |
aux_derived(),
|
sl@0
|
291 |
actor_tuple_t(
|
sl@0
|
292 |
phoenix::as_actor<A>::convert(a),
|
sl@0
|
293 |
phoenix::as_actor<B>::convert(b)
|
sl@0
|
294 |
)
|
sl@0
|
295 |
);
|
sl@0
|
296 |
}
|
sl@0
|
297 |
|
sl@0
|
298 |
template <typename A, typename B, typename C>
|
sl@0
|
299 |
init_closure_parser<
|
sl@0
|
300 |
DerivedT2,
|
sl@0
|
301 |
phoenix::tuple<
|
sl@0
|
302 |
typename phoenix::as_actor<A>::type,
|
sl@0
|
303 |
typename phoenix::as_actor<B>::type,
|
sl@0
|
304 |
typename phoenix::as_actor<C>::type
|
sl@0
|
305 |
>
|
sl@0
|
306 |
>
|
sl@0
|
307 |
operator()(A const &a, B const &b, C const &c) const
|
sl@0
|
308 |
{
|
sl@0
|
309 |
typedef typename phoenix::as_actor<A>::type a_t;
|
sl@0
|
310 |
typedef typename phoenix::as_actor<B>::type b_t;
|
sl@0
|
311 |
typedef typename phoenix::as_actor<C>::type c_t;
|
sl@0
|
312 |
typedef phoenix::tuple<a_t, b_t, c_t> actor_tuple_t;
|
sl@0
|
313 |
|
sl@0
|
314 |
return init_closure_parser<DerivedT2, actor_tuple_t>(
|
sl@0
|
315 |
aux_derived(),
|
sl@0
|
316 |
actor_tuple_t(
|
sl@0
|
317 |
phoenix::as_actor<A>::convert(a),
|
sl@0
|
318 |
phoenix::as_actor<B>::convert(b),
|
sl@0
|
319 |
phoenix::as_actor<C>::convert(c)
|
sl@0
|
320 |
)
|
sl@0
|
321 |
);
|
sl@0
|
322 |
}
|
sl@0
|
323 |
|
sl@0
|
324 |
#if BOOST_SPIRIT_CLOSURE_LIMIT > 3
|
sl@0
|
325 |
|
sl@0
|
326 |
template <
|
sl@0
|
327 |
typename A, typename B, typename C, typename D
|
sl@0
|
328 |
>
|
sl@0
|
329 |
init_closure_parser<
|
sl@0
|
330 |
DerivedT2,
|
sl@0
|
331 |
phoenix::tuple<
|
sl@0
|
332 |
typename phoenix::as_actor<A>::type,
|
sl@0
|
333 |
typename phoenix::as_actor<B>::type,
|
sl@0
|
334 |
typename phoenix::as_actor<C>::type,
|
sl@0
|
335 |
typename phoenix::as_actor<D>::type
|
sl@0
|
336 |
>
|
sl@0
|
337 |
>
|
sl@0
|
338 |
operator()(
|
sl@0
|
339 |
A const &a, B const &b, C const &c, D const &d
|
sl@0
|
340 |
) const
|
sl@0
|
341 |
{
|
sl@0
|
342 |
typedef typename phoenix::as_actor<A>::type a_t;
|
sl@0
|
343 |
typedef typename phoenix::as_actor<B>::type b_t;
|
sl@0
|
344 |
typedef typename phoenix::as_actor<C>::type c_t;
|
sl@0
|
345 |
typedef typename phoenix::as_actor<D>::type d_t;
|
sl@0
|
346 |
typedef phoenix::tuple<
|
sl@0
|
347 |
a_t, b_t, c_t, d_t
|
sl@0
|
348 |
> actor_tuple_t;
|
sl@0
|
349 |
|
sl@0
|
350 |
return init_closure_parser<DerivedT2, actor_tuple_t>(
|
sl@0
|
351 |
aux_derived(),
|
sl@0
|
352 |
actor_tuple_t(
|
sl@0
|
353 |
phoenix::as_actor<A>::convert(a),
|
sl@0
|
354 |
phoenix::as_actor<B>::convert(b),
|
sl@0
|
355 |
phoenix::as_actor<C>::convert(c),
|
sl@0
|
356 |
phoenix::as_actor<D>::convert(d)
|
sl@0
|
357 |
)
|
sl@0
|
358 |
);
|
sl@0
|
359 |
}
|
sl@0
|
360 |
|
sl@0
|
361 |
template <
|
sl@0
|
362 |
typename A, typename B, typename C, typename D, typename E
|
sl@0
|
363 |
>
|
sl@0
|
364 |
init_closure_parser<
|
sl@0
|
365 |
DerivedT2,
|
sl@0
|
366 |
phoenix::tuple<
|
sl@0
|
367 |
typename phoenix::as_actor<A>::type,
|
sl@0
|
368 |
typename phoenix::as_actor<B>::type,
|
sl@0
|
369 |
typename phoenix::as_actor<C>::type,
|
sl@0
|
370 |
typename phoenix::as_actor<D>::type,
|
sl@0
|
371 |
typename phoenix::as_actor<E>::type
|
sl@0
|
372 |
>
|
sl@0
|
373 |
>
|
sl@0
|
374 |
operator()(
|
sl@0
|
375 |
A const &a, B const &b, C const &c, D const &d, E const &e
|
sl@0
|
376 |
) const
|
sl@0
|
377 |
{
|
sl@0
|
378 |
typedef typename phoenix::as_actor<A>::type a_t;
|
sl@0
|
379 |
typedef typename phoenix::as_actor<B>::type b_t;
|
sl@0
|
380 |
typedef typename phoenix::as_actor<C>::type c_t;
|
sl@0
|
381 |
typedef typename phoenix::as_actor<D>::type d_t;
|
sl@0
|
382 |
typedef typename phoenix::as_actor<E>::type e_t;
|
sl@0
|
383 |
typedef phoenix::tuple<
|
sl@0
|
384 |
a_t, b_t, c_t, d_t, e_t
|
sl@0
|
385 |
> actor_tuple_t;
|
sl@0
|
386 |
|
sl@0
|
387 |
return init_closure_parser<DerivedT2, actor_tuple_t>(
|
sl@0
|
388 |
aux_derived(),
|
sl@0
|
389 |
actor_tuple_t(
|
sl@0
|
390 |
phoenix::as_actor<A>::convert(a),
|
sl@0
|
391 |
phoenix::as_actor<B>::convert(b),
|
sl@0
|
392 |
phoenix::as_actor<C>::convert(c),
|
sl@0
|
393 |
phoenix::as_actor<D>::convert(d),
|
sl@0
|
394 |
phoenix::as_actor<E>::convert(e)
|
sl@0
|
395 |
)
|
sl@0
|
396 |
);
|
sl@0
|
397 |
}
|
sl@0
|
398 |
|
sl@0
|
399 |
template <
|
sl@0
|
400 |
typename A, typename B, typename C, typename D, typename E,
|
sl@0
|
401 |
typename F
|
sl@0
|
402 |
>
|
sl@0
|
403 |
init_closure_parser<
|
sl@0
|
404 |
DerivedT2,
|
sl@0
|
405 |
phoenix::tuple<
|
sl@0
|
406 |
typename phoenix::as_actor<A>::type,
|
sl@0
|
407 |
typename phoenix::as_actor<B>::type,
|
sl@0
|
408 |
typename phoenix::as_actor<C>::type,
|
sl@0
|
409 |
typename phoenix::as_actor<D>::type,
|
sl@0
|
410 |
typename phoenix::as_actor<E>::type,
|
sl@0
|
411 |
typename phoenix::as_actor<F>::type
|
sl@0
|
412 |
>
|
sl@0
|
413 |
>
|
sl@0
|
414 |
operator()(
|
sl@0
|
415 |
A const &a, B const &b, C const &c, D const &d, E const &e,
|
sl@0
|
416 |
F const &f
|
sl@0
|
417 |
) const
|
sl@0
|
418 |
{
|
sl@0
|
419 |
typedef typename phoenix::as_actor<A>::type a_t;
|
sl@0
|
420 |
typedef typename phoenix::as_actor<B>::type b_t;
|
sl@0
|
421 |
typedef typename phoenix::as_actor<C>::type c_t;
|
sl@0
|
422 |
typedef typename phoenix::as_actor<D>::type d_t;
|
sl@0
|
423 |
typedef typename phoenix::as_actor<E>::type e_t;
|
sl@0
|
424 |
typedef typename phoenix::as_actor<F>::type f_t;
|
sl@0
|
425 |
typedef phoenix::tuple<
|
sl@0
|
426 |
a_t, b_t, c_t, d_t, e_t, f_t
|
sl@0
|
427 |
> actor_tuple_t;
|
sl@0
|
428 |
|
sl@0
|
429 |
return init_closure_parser<DerivedT2, actor_tuple_t>(
|
sl@0
|
430 |
aux_derived(),
|
sl@0
|
431 |
actor_tuple_t(
|
sl@0
|
432 |
phoenix::as_actor<A>::convert(a),
|
sl@0
|
433 |
phoenix::as_actor<B>::convert(b),
|
sl@0
|
434 |
phoenix::as_actor<C>::convert(c),
|
sl@0
|
435 |
phoenix::as_actor<D>::convert(d),
|
sl@0
|
436 |
phoenix::as_actor<E>::convert(e),
|
sl@0
|
437 |
phoenix::as_actor<F>::convert(f)
|
sl@0
|
438 |
)
|
sl@0
|
439 |
);
|
sl@0
|
440 |
}
|
sl@0
|
441 |
|
sl@0
|
442 |
#if BOOST_SPIRIT_CLOSURE_LIMIT > 6
|
sl@0
|
443 |
|
sl@0
|
444 |
template <
|
sl@0
|
445 |
typename A, typename B, typename C, typename D, typename E,
|
sl@0
|
446 |
typename F, typename G
|
sl@0
|
447 |
>
|
sl@0
|
448 |
init_closure_parser<
|
sl@0
|
449 |
DerivedT2,
|
sl@0
|
450 |
phoenix::tuple<
|
sl@0
|
451 |
typename phoenix::as_actor<A>::type,
|
sl@0
|
452 |
typename phoenix::as_actor<B>::type,
|
sl@0
|
453 |
typename phoenix::as_actor<C>::type,
|
sl@0
|
454 |
typename phoenix::as_actor<D>::type,
|
sl@0
|
455 |
typename phoenix::as_actor<E>::type,
|
sl@0
|
456 |
typename phoenix::as_actor<F>::type,
|
sl@0
|
457 |
typename phoenix::as_actor<G>::type
|
sl@0
|
458 |
>
|
sl@0
|
459 |
>
|
sl@0
|
460 |
operator()(
|
sl@0
|
461 |
A const &a, B const &b, C const &c, D const &d, E const &e,
|
sl@0
|
462 |
F const &f, G const &g
|
sl@0
|
463 |
) const
|
sl@0
|
464 |
{
|
sl@0
|
465 |
typedef typename phoenix::as_actor<A>::type a_t;
|
sl@0
|
466 |
typedef typename phoenix::as_actor<B>::type b_t;
|
sl@0
|
467 |
typedef typename phoenix::as_actor<C>::type c_t;
|
sl@0
|
468 |
typedef typename phoenix::as_actor<D>::type d_t;
|
sl@0
|
469 |
typedef typename phoenix::as_actor<E>::type e_t;
|
sl@0
|
470 |
typedef typename phoenix::as_actor<F>::type f_t;
|
sl@0
|
471 |
typedef typename phoenix::as_actor<G>::type g_t;
|
sl@0
|
472 |
typedef phoenix::tuple<
|
sl@0
|
473 |
a_t, b_t, c_t, d_t, e_t, f_t, g_t
|
sl@0
|
474 |
> actor_tuple_t;
|
sl@0
|
475 |
|
sl@0
|
476 |
return init_closure_parser<DerivedT2, actor_tuple_t>(
|
sl@0
|
477 |
aux_derived(),
|
sl@0
|
478 |
actor_tuple_t(
|
sl@0
|
479 |
phoenix::as_actor<A>::convert(a),
|
sl@0
|
480 |
phoenix::as_actor<B>::convert(b),
|
sl@0
|
481 |
phoenix::as_actor<C>::convert(c),
|
sl@0
|
482 |
phoenix::as_actor<D>::convert(d),
|
sl@0
|
483 |
phoenix::as_actor<E>::convert(e),
|
sl@0
|
484 |
phoenix::as_actor<F>::convert(f),
|
sl@0
|
485 |
phoenix::as_actor<G>::convert(g)
|
sl@0
|
486 |
)
|
sl@0
|
487 |
);
|
sl@0
|
488 |
}
|
sl@0
|
489 |
|
sl@0
|
490 |
template <
|
sl@0
|
491 |
typename A, typename B, typename C, typename D, typename E,
|
sl@0
|
492 |
typename F, typename G, typename H
|
sl@0
|
493 |
>
|
sl@0
|
494 |
init_closure_parser<
|
sl@0
|
495 |
DerivedT2,
|
sl@0
|
496 |
phoenix::tuple<
|
sl@0
|
497 |
typename phoenix::as_actor<A>::type,
|
sl@0
|
498 |
typename phoenix::as_actor<B>::type,
|
sl@0
|
499 |
typename phoenix::as_actor<C>::type,
|
sl@0
|
500 |
typename phoenix::as_actor<D>::type,
|
sl@0
|
501 |
typename phoenix::as_actor<E>::type,
|
sl@0
|
502 |
typename phoenix::as_actor<F>::type,
|
sl@0
|
503 |
typename phoenix::as_actor<G>::type,
|
sl@0
|
504 |
typename phoenix::as_actor<H>::type
|
sl@0
|
505 |
>
|
sl@0
|
506 |
>
|
sl@0
|
507 |
operator()(
|
sl@0
|
508 |
A const &a, B const &b, C const &c, D const &d, E const &e,
|
sl@0
|
509 |
F const &f, G const &g, H const &h
|
sl@0
|
510 |
) const
|
sl@0
|
511 |
{
|
sl@0
|
512 |
typedef typename phoenix::as_actor<A>::type a_t;
|
sl@0
|
513 |
typedef typename phoenix::as_actor<B>::type b_t;
|
sl@0
|
514 |
typedef typename phoenix::as_actor<C>::type c_t;
|
sl@0
|
515 |
typedef typename phoenix::as_actor<D>::type d_t;
|
sl@0
|
516 |
typedef typename phoenix::as_actor<E>::type e_t;
|
sl@0
|
517 |
typedef typename phoenix::as_actor<F>::type f_t;
|
sl@0
|
518 |
typedef typename phoenix::as_actor<G>::type g_t;
|
sl@0
|
519 |
typedef typename phoenix::as_actor<H>::type h_t;
|
sl@0
|
520 |
typedef phoenix::tuple<
|
sl@0
|
521 |
a_t, b_t, c_t, d_t, e_t, f_t, g_t, h_t
|
sl@0
|
522 |
> actor_tuple_t;
|
sl@0
|
523 |
|
sl@0
|
524 |
return init_closure_parser<DerivedT2, actor_tuple_t>(
|
sl@0
|
525 |
aux_derived(),
|
sl@0
|
526 |
actor_tuple_t(
|
sl@0
|
527 |
phoenix::as_actor<A>::convert(a),
|
sl@0
|
528 |
phoenix::as_actor<B>::convert(b),
|
sl@0
|
529 |
phoenix::as_actor<C>::convert(c),
|
sl@0
|
530 |
phoenix::as_actor<D>::convert(d),
|
sl@0
|
531 |
phoenix::as_actor<E>::convert(e),
|
sl@0
|
532 |
phoenix::as_actor<F>::convert(f),
|
sl@0
|
533 |
phoenix::as_actor<G>::convert(g),
|
sl@0
|
534 |
phoenix::as_actor<H>::convert(h)
|
sl@0
|
535 |
)
|
sl@0
|
536 |
);
|
sl@0
|
537 |
}
|
sl@0
|
538 |
|
sl@0
|
539 |
template <
|
sl@0
|
540 |
typename A, typename B, typename C, typename D, typename E,
|
sl@0
|
541 |
typename F, typename G, typename H, typename I
|
sl@0
|
542 |
>
|
sl@0
|
543 |
init_closure_parser<
|
sl@0
|
544 |
DerivedT2,
|
sl@0
|
545 |
phoenix::tuple<
|
sl@0
|
546 |
typename phoenix::as_actor<A>::type,
|
sl@0
|
547 |
typename phoenix::as_actor<B>::type,
|
sl@0
|
548 |
typename phoenix::as_actor<C>::type,
|
sl@0
|
549 |
typename phoenix::as_actor<D>::type,
|
sl@0
|
550 |
typename phoenix::as_actor<E>::type,
|
sl@0
|
551 |
typename phoenix::as_actor<F>::type,
|
sl@0
|
552 |
typename phoenix::as_actor<G>::type,
|
sl@0
|
553 |
typename phoenix::as_actor<H>::type,
|
sl@0
|
554 |
typename phoenix::as_actor<I>::type
|
sl@0
|
555 |
>
|
sl@0
|
556 |
>
|
sl@0
|
557 |
operator()(
|
sl@0
|
558 |
A const &a, B const &b, C const &c, D const &d, E const &e,
|
sl@0
|
559 |
F const &f, G const &g, H const &h, I const &i
|
sl@0
|
560 |
) const
|
sl@0
|
561 |
{
|
sl@0
|
562 |
typedef typename phoenix::as_actor<A>::type a_t;
|
sl@0
|
563 |
typedef typename phoenix::as_actor<B>::type b_t;
|
sl@0
|
564 |
typedef typename phoenix::as_actor<C>::type c_t;
|
sl@0
|
565 |
typedef typename phoenix::as_actor<D>::type d_t;
|
sl@0
|
566 |
typedef typename phoenix::as_actor<E>::type e_t;
|
sl@0
|
567 |
typedef typename phoenix::as_actor<F>::type f_t;
|
sl@0
|
568 |
typedef typename phoenix::as_actor<G>::type g_t;
|
sl@0
|
569 |
typedef typename phoenix::as_actor<H>::type h_t;
|
sl@0
|
570 |
typedef typename phoenix::as_actor<I>::type i_t;
|
sl@0
|
571 |
typedef phoenix::tuple<
|
sl@0
|
572 |
a_t, b_t, c_t, d_t, e_t, f_t, g_t, h_t, i_t
|
sl@0
|
573 |
> actor_tuple_t;
|
sl@0
|
574 |
|
sl@0
|
575 |
return init_closure_parser<DerivedT2, actor_tuple_t>(
|
sl@0
|
576 |
aux_derived(),
|
sl@0
|
577 |
actor_tuple_t(
|
sl@0
|
578 |
phoenix::as_actor<A>::convert(a),
|
sl@0
|
579 |
phoenix::as_actor<B>::convert(b),
|
sl@0
|
580 |
phoenix::as_actor<C>::convert(c),
|
sl@0
|
581 |
phoenix::as_actor<D>::convert(d),
|
sl@0
|
582 |
phoenix::as_actor<E>::convert(e),
|
sl@0
|
583 |
phoenix::as_actor<F>::convert(f),
|
sl@0
|
584 |
phoenix::as_actor<G>::convert(g),
|
sl@0
|
585 |
phoenix::as_actor<H>::convert(h),
|
sl@0
|
586 |
phoenix::as_actor<I>::convert(i)
|
sl@0
|
587 |
)
|
sl@0
|
588 |
);
|
sl@0
|
589 |
}
|
sl@0
|
590 |
|
sl@0
|
591 |
#if BOOST_SPIRIT_CLOSURE_LIMIT > 9
|
sl@0
|
592 |
|
sl@0
|
593 |
template <
|
sl@0
|
594 |
typename A, typename B, typename C, typename D, typename E,
|
sl@0
|
595 |
typename F, typename G, typename H, typename I, typename J
|
sl@0
|
596 |
>
|
sl@0
|
597 |
init_closure_parser<
|
sl@0
|
598 |
DerivedT2,
|
sl@0
|
599 |
phoenix::tuple<
|
sl@0
|
600 |
typename phoenix::as_actor<A>::type,
|
sl@0
|
601 |
typename phoenix::as_actor<B>::type,
|
sl@0
|
602 |
typename phoenix::as_actor<C>::type,
|
sl@0
|
603 |
typename phoenix::as_actor<D>::type,
|
sl@0
|
604 |
typename phoenix::as_actor<E>::type,
|
sl@0
|
605 |
typename phoenix::as_actor<F>::type,
|
sl@0
|
606 |
typename phoenix::as_actor<G>::type,
|
sl@0
|
607 |
typename phoenix::as_actor<H>::type,
|
sl@0
|
608 |
typename phoenix::as_actor<I>::type,
|
sl@0
|
609 |
typename phoenix::as_actor<J>::type
|
sl@0
|
610 |
>
|
sl@0
|
611 |
>
|
sl@0
|
612 |
operator()(
|
sl@0
|
613 |
A const &a, B const &b, C const &c, D const &d, E const &e,
|
sl@0
|
614 |
F const &f, G const &g, H const &h, I const &i, J const &j
|
sl@0
|
615 |
) const
|
sl@0
|
616 |
{
|
sl@0
|
617 |
typedef typename phoenix::as_actor<A>::type a_t;
|
sl@0
|
618 |
typedef typename phoenix::as_actor<B>::type b_t;
|
sl@0
|
619 |
typedef typename phoenix::as_actor<C>::type c_t;
|
sl@0
|
620 |
typedef typename phoenix::as_actor<D>::type d_t;
|
sl@0
|
621 |
typedef typename phoenix::as_actor<E>::type e_t;
|
sl@0
|
622 |
typedef typename phoenix::as_actor<F>::type f_t;
|
sl@0
|
623 |
typedef typename phoenix::as_actor<G>::type g_t;
|
sl@0
|
624 |
typedef typename phoenix::as_actor<H>::type h_t;
|
sl@0
|
625 |
typedef typename phoenix::as_actor<I>::type i_t;
|
sl@0
|
626 |
typedef typename phoenix::as_actor<J>::type j_t;
|
sl@0
|
627 |
typedef phoenix::tuple<
|
sl@0
|
628 |
a_t, b_t, c_t, d_t, e_t, f_t, g_t, h_t, i_t, j_t
|
sl@0
|
629 |
> actor_tuple_t;
|
sl@0
|
630 |
|
sl@0
|
631 |
return init_closure_parser<DerivedT2, actor_tuple_t>(
|
sl@0
|
632 |
aux_derived(),
|
sl@0
|
633 |
actor_tuple_t(
|
sl@0
|
634 |
phoenix::as_actor<A>::convert(a),
|
sl@0
|
635 |
phoenix::as_actor<B>::convert(b),
|
sl@0
|
636 |
phoenix::as_actor<C>::convert(c),
|
sl@0
|
637 |
phoenix::as_actor<D>::convert(d),
|
sl@0
|
638 |
phoenix::as_actor<E>::convert(e),
|
sl@0
|
639 |
phoenix::as_actor<F>::convert(f),
|
sl@0
|
640 |
phoenix::as_actor<G>::convert(g),
|
sl@0
|
641 |
phoenix::as_actor<H>::convert(h),
|
sl@0
|
642 |
phoenix::as_actor<I>::convert(i),
|
sl@0
|
643 |
phoenix::as_actor<J>::convert(j)
|
sl@0
|
644 |
)
|
sl@0
|
645 |
);
|
sl@0
|
646 |
}
|
sl@0
|
647 |
|
sl@0
|
648 |
template <
|
sl@0
|
649 |
typename A, typename B, typename C, typename D, typename E,
|
sl@0
|
650 |
typename F, typename G, typename H, typename I, typename J,
|
sl@0
|
651 |
typename K
|
sl@0
|
652 |
>
|
sl@0
|
653 |
init_closure_parser<
|
sl@0
|
654 |
DerivedT2,
|
sl@0
|
655 |
phoenix::tuple<
|
sl@0
|
656 |
typename phoenix::as_actor<A>::type,
|
sl@0
|
657 |
typename phoenix::as_actor<B>::type,
|
sl@0
|
658 |
typename phoenix::as_actor<C>::type,
|
sl@0
|
659 |
typename phoenix::as_actor<D>::type,
|
sl@0
|
660 |
typename phoenix::as_actor<E>::type,
|
sl@0
|
661 |
typename phoenix::as_actor<F>::type,
|
sl@0
|
662 |
typename phoenix::as_actor<G>::type,
|
sl@0
|
663 |
typename phoenix::as_actor<H>::type,
|
sl@0
|
664 |
typename phoenix::as_actor<I>::type,
|
sl@0
|
665 |
typename phoenix::as_actor<J>::type,
|
sl@0
|
666 |
typename phoenix::as_actor<K>::type
|
sl@0
|
667 |
>
|
sl@0
|
668 |
>
|
sl@0
|
669 |
operator()(
|
sl@0
|
670 |
A const &a, B const &b, C const &c, D const &d, E const &e,
|
sl@0
|
671 |
F const &f, G const &g, H const &h, I const &i, J const &j,
|
sl@0
|
672 |
K const &k
|
sl@0
|
673 |
) const
|
sl@0
|
674 |
{
|
sl@0
|
675 |
typedef typename phoenix::as_actor<A>::type a_t;
|
sl@0
|
676 |
typedef typename phoenix::as_actor<B>::type b_t;
|
sl@0
|
677 |
typedef typename phoenix::as_actor<C>::type c_t;
|
sl@0
|
678 |
typedef typename phoenix::as_actor<D>::type d_t;
|
sl@0
|
679 |
typedef typename phoenix::as_actor<E>::type e_t;
|
sl@0
|
680 |
typedef typename phoenix::as_actor<F>::type f_t;
|
sl@0
|
681 |
typedef typename phoenix::as_actor<G>::type g_t;
|
sl@0
|
682 |
typedef typename phoenix::as_actor<H>::type h_t;
|
sl@0
|
683 |
typedef typename phoenix::as_actor<I>::type i_t;
|
sl@0
|
684 |
typedef typename phoenix::as_actor<J>::type j_t;
|
sl@0
|
685 |
typedef typename phoenix::as_actor<K>::type k_t;
|
sl@0
|
686 |
typedef phoenix::tuple<
|
sl@0
|
687 |
a_t, b_t, c_t, d_t, e_t, f_t, g_t, h_t, i_t, j_t,
|
sl@0
|
688 |
k_t
|
sl@0
|
689 |
> actor_tuple_t;
|
sl@0
|
690 |
|
sl@0
|
691 |
return init_closure_parser<DerivedT2, actor_tuple_t>(
|
sl@0
|
692 |
aux_derived(),
|
sl@0
|
693 |
actor_tuple_t(
|
sl@0
|
694 |
phoenix::as_actor<A>::convert(a),
|
sl@0
|
695 |
phoenix::as_actor<B>::convert(b),
|
sl@0
|
696 |
phoenix::as_actor<C>::convert(c),
|
sl@0
|
697 |
phoenix::as_actor<D>::convert(d),
|
sl@0
|
698 |
phoenix::as_actor<E>::convert(e),
|
sl@0
|
699 |
phoenix::as_actor<F>::convert(f),
|
sl@0
|
700 |
phoenix::as_actor<G>::convert(g),
|
sl@0
|
701 |
phoenix::as_actor<H>::convert(h),
|
sl@0
|
702 |
phoenix::as_actor<I>::convert(i),
|
sl@0
|
703 |
phoenix::as_actor<J>::convert(j),
|
sl@0
|
704 |
phoenix::as_actor<K>::convert(k)
|
sl@0
|
705 |
)
|
sl@0
|
706 |
);
|
sl@0
|
707 |
}
|
sl@0
|
708 |
|
sl@0
|
709 |
template <
|
sl@0
|
710 |
typename A, typename B, typename C, typename D, typename E,
|
sl@0
|
711 |
typename F, typename G, typename H, typename I, typename J,
|
sl@0
|
712 |
typename K, typename L
|
sl@0
|
713 |
>
|
sl@0
|
714 |
init_closure_parser<
|
sl@0
|
715 |
DerivedT2,
|
sl@0
|
716 |
phoenix::tuple<
|
sl@0
|
717 |
typename phoenix::as_actor<A>::type,
|
sl@0
|
718 |
typename phoenix::as_actor<B>::type,
|
sl@0
|
719 |
typename phoenix::as_actor<C>::type,
|
sl@0
|
720 |
typename phoenix::as_actor<D>::type,
|
sl@0
|
721 |
typename phoenix::as_actor<E>::type,
|
sl@0
|
722 |
typename phoenix::as_actor<F>::type,
|
sl@0
|
723 |
typename phoenix::as_actor<G>::type,
|
sl@0
|
724 |
typename phoenix::as_actor<H>::type,
|
sl@0
|
725 |
typename phoenix::as_actor<I>::type,
|
sl@0
|
726 |
typename phoenix::as_actor<J>::type,
|
sl@0
|
727 |
typename phoenix::as_actor<K>::type,
|
sl@0
|
728 |
typename phoenix::as_actor<L>::type
|
sl@0
|
729 |
>
|
sl@0
|
730 |
>
|
sl@0
|
731 |
operator()(
|
sl@0
|
732 |
A const &a, B const &b, C const &c, D const &d, E const &e,
|
sl@0
|
733 |
F const &f, G const &g, H const &h, I const &i, J const &j,
|
sl@0
|
734 |
K const &k, L const &l
|
sl@0
|
735 |
) const
|
sl@0
|
736 |
{
|
sl@0
|
737 |
typedef typename phoenix::as_actor<A>::type a_t;
|
sl@0
|
738 |
typedef typename phoenix::as_actor<B>::type b_t;
|
sl@0
|
739 |
typedef typename phoenix::as_actor<C>::type c_t;
|
sl@0
|
740 |
typedef typename phoenix::as_actor<D>::type d_t;
|
sl@0
|
741 |
typedef typename phoenix::as_actor<E>::type e_t;
|
sl@0
|
742 |
typedef typename phoenix::as_actor<F>::type f_t;
|
sl@0
|
743 |
typedef typename phoenix::as_actor<G>::type g_t;
|
sl@0
|
744 |
typedef typename phoenix::as_actor<H>::type h_t;
|
sl@0
|
745 |
typedef typename phoenix::as_actor<I>::type i_t;
|
sl@0
|
746 |
typedef typename phoenix::as_actor<J>::type j_t;
|
sl@0
|
747 |
typedef typename phoenix::as_actor<K>::type k_t;
|
sl@0
|
748 |
typedef typename phoenix::as_actor<L>::type l_t;
|
sl@0
|
749 |
typedef phoenix::tuple<
|
sl@0
|
750 |
a_t, b_t, c_t, d_t, e_t, f_t, g_t, h_t, i_t, j_t,
|
sl@0
|
751 |
k_t, l_t
|
sl@0
|
752 |
> actor_tuple_t;
|
sl@0
|
753 |
|
sl@0
|
754 |
return init_closure_parser<DerivedT2, actor_tuple_t>(
|
sl@0
|
755 |
aux_derived(),
|
sl@0
|
756 |
actor_tuple_t(
|
sl@0
|
757 |
phoenix::as_actor<A>::convert(a),
|
sl@0
|
758 |
phoenix::as_actor<B>::convert(b),
|
sl@0
|
759 |
phoenix::as_actor<C>::convert(c),
|
sl@0
|
760 |
phoenix::as_actor<D>::convert(d),
|
sl@0
|
761 |
phoenix::as_actor<E>::convert(e),
|
sl@0
|
762 |
phoenix::as_actor<F>::convert(f),
|
sl@0
|
763 |
phoenix::as_actor<G>::convert(g),
|
sl@0
|
764 |
phoenix::as_actor<H>::convert(h),
|
sl@0
|
765 |
phoenix::as_actor<I>::convert(i),
|
sl@0
|
766 |
phoenix::as_actor<J>::convert(j),
|
sl@0
|
767 |
phoenix::as_actor<K>::convert(k),
|
sl@0
|
768 |
phoenix::as_actor<L>::convert(l)
|
sl@0
|
769 |
)
|
sl@0
|
770 |
);
|
sl@0
|
771 |
}
|
sl@0
|
772 |
|
sl@0
|
773 |
#if BOOST_SPIRIT_CLOSURE_LIMIT > 12
|
sl@0
|
774 |
|
sl@0
|
775 |
template <
|
sl@0
|
776 |
typename A, typename B, typename C, typename D, typename E,
|
sl@0
|
777 |
typename F, typename G, typename H, typename I, typename J,
|
sl@0
|
778 |
typename K, typename L, typename M
|
sl@0
|
779 |
>
|
sl@0
|
780 |
init_closure_parser<
|
sl@0
|
781 |
DerivedT2,
|
sl@0
|
782 |
phoenix::tuple<
|
sl@0
|
783 |
typename phoenix::as_actor<A>::type,
|
sl@0
|
784 |
typename phoenix::as_actor<B>::type,
|
sl@0
|
785 |
typename phoenix::as_actor<C>::type,
|
sl@0
|
786 |
typename phoenix::as_actor<D>::type,
|
sl@0
|
787 |
typename phoenix::as_actor<E>::type,
|
sl@0
|
788 |
typename phoenix::as_actor<F>::type,
|
sl@0
|
789 |
typename phoenix::as_actor<G>::type,
|
sl@0
|
790 |
typename phoenix::as_actor<H>::type,
|
sl@0
|
791 |
typename phoenix::as_actor<I>::type,
|
sl@0
|
792 |
typename phoenix::as_actor<J>::type,
|
sl@0
|
793 |
typename phoenix::as_actor<K>::type,
|
sl@0
|
794 |
typename phoenix::as_actor<L>::type,
|
sl@0
|
795 |
typename phoenix::as_actor<M>::type
|
sl@0
|
796 |
>
|
sl@0
|
797 |
>
|
sl@0
|
798 |
operator()(
|
sl@0
|
799 |
A const &a, B const &b, C const &c, D const &d, E const &e,
|
sl@0
|
800 |
F const &f, G const &g, H const &h, I const &i, J const &j,
|
sl@0
|
801 |
K const &k, L const &l, M const &m
|
sl@0
|
802 |
) const
|
sl@0
|
803 |
{
|
sl@0
|
804 |
typedef typename phoenix::as_actor<A>::type a_t;
|
sl@0
|
805 |
typedef typename phoenix::as_actor<B>::type b_t;
|
sl@0
|
806 |
typedef typename phoenix::as_actor<C>::type c_t;
|
sl@0
|
807 |
typedef typename phoenix::as_actor<D>::type d_t;
|
sl@0
|
808 |
typedef typename phoenix::as_actor<E>::type e_t;
|
sl@0
|
809 |
typedef typename phoenix::as_actor<F>::type f_t;
|
sl@0
|
810 |
typedef typename phoenix::as_actor<G>::type g_t;
|
sl@0
|
811 |
typedef typename phoenix::as_actor<H>::type h_t;
|
sl@0
|
812 |
typedef typename phoenix::as_actor<I>::type i_t;
|
sl@0
|
813 |
typedef typename phoenix::as_actor<J>::type j_t;
|
sl@0
|
814 |
typedef typename phoenix::as_actor<K>::type k_t;
|
sl@0
|
815 |
typedef typename phoenix::as_actor<L>::type l_t;
|
sl@0
|
816 |
typedef typename phoenix::as_actor<M>::type m_t;
|
sl@0
|
817 |
typedef phoenix::tuple<
|
sl@0
|
818 |
a_t, b_t, c_t, d_t, e_t, f_t, g_t, h_t, i_t, j_t,
|
sl@0
|
819 |
k_t, l_t, m_t
|
sl@0
|
820 |
> actor_tuple_t;
|
sl@0
|
821 |
|
sl@0
|
822 |
return init_closure_parser<DerivedT2, actor_tuple_t>(
|
sl@0
|
823 |
aux_derived(),
|
sl@0
|
824 |
actor_tuple_t(
|
sl@0
|
825 |
phoenix::as_actor<A>::convert(a),
|
sl@0
|
826 |
phoenix::as_actor<B>::convert(b),
|
sl@0
|
827 |
phoenix::as_actor<C>::convert(c),
|
sl@0
|
828 |
phoenix::as_actor<D>::convert(d),
|
sl@0
|
829 |
phoenix::as_actor<E>::convert(e),
|
sl@0
|
830 |
phoenix::as_actor<F>::convert(f),
|
sl@0
|
831 |
phoenix::as_actor<G>::convert(g),
|
sl@0
|
832 |
phoenix::as_actor<H>::convert(h),
|
sl@0
|
833 |
phoenix::as_actor<I>::convert(i),
|
sl@0
|
834 |
phoenix::as_actor<J>::convert(j),
|
sl@0
|
835 |
phoenix::as_actor<K>::convert(k),
|
sl@0
|
836 |
phoenix::as_actor<L>::convert(l),
|
sl@0
|
837 |
phoenix::as_actor<M>::convert(m)
|
sl@0
|
838 |
)
|
sl@0
|
839 |
);
|
sl@0
|
840 |
}
|
sl@0
|
841 |
|
sl@0
|
842 |
template <
|
sl@0
|
843 |
typename A, typename B, typename C, typename D, typename E,
|
sl@0
|
844 |
typename F, typename G, typename H, typename I, typename J,
|
sl@0
|
845 |
typename K, typename L, typename M, typename N
|
sl@0
|
846 |
>
|
sl@0
|
847 |
init_closure_parser<
|
sl@0
|
848 |
DerivedT2,
|
sl@0
|
849 |
phoenix::tuple<
|
sl@0
|
850 |
typename phoenix::as_actor<A>::type,
|
sl@0
|
851 |
typename phoenix::as_actor<B>::type,
|
sl@0
|
852 |
typename phoenix::as_actor<C>::type,
|
sl@0
|
853 |
typename phoenix::as_actor<D>::type,
|
sl@0
|
854 |
typename phoenix::as_actor<E>::type,
|
sl@0
|
855 |
typename phoenix::as_actor<F>::type,
|
sl@0
|
856 |
typename phoenix::as_actor<G>::type,
|
sl@0
|
857 |
typename phoenix::as_actor<H>::type,
|
sl@0
|
858 |
typename phoenix::as_actor<I>::type,
|
sl@0
|
859 |
typename phoenix::as_actor<J>::type,
|
sl@0
|
860 |
typename phoenix::as_actor<K>::type,
|
sl@0
|
861 |
typename phoenix::as_actor<L>::type,
|
sl@0
|
862 |
typename phoenix::as_actor<M>::type,
|
sl@0
|
863 |
typename phoenix::as_actor<N>::type
|
sl@0
|
864 |
>
|
sl@0
|
865 |
>
|
sl@0
|
866 |
operator()(
|
sl@0
|
867 |
A const &a, B const &b, C const &c, D const &d, E const &e,
|
sl@0
|
868 |
F const &f, G const &g, H const &h, I const &i, J const &j,
|
sl@0
|
869 |
K const &k, L const &l, M const &m, N const &n
|
sl@0
|
870 |
) const
|
sl@0
|
871 |
{
|
sl@0
|
872 |
typedef typename phoenix::as_actor<A>::type a_t;
|
sl@0
|
873 |
typedef typename phoenix::as_actor<B>::type b_t;
|
sl@0
|
874 |
typedef typename phoenix::as_actor<C>::type c_t;
|
sl@0
|
875 |
typedef typename phoenix::as_actor<D>::type d_t;
|
sl@0
|
876 |
typedef typename phoenix::as_actor<E>::type e_t;
|
sl@0
|
877 |
typedef typename phoenix::as_actor<F>::type f_t;
|
sl@0
|
878 |
typedef typename phoenix::as_actor<G>::type g_t;
|
sl@0
|
879 |
typedef typename phoenix::as_actor<H>::type h_t;
|
sl@0
|
880 |
typedef typename phoenix::as_actor<I>::type i_t;
|
sl@0
|
881 |
typedef typename phoenix::as_actor<J>::type j_t;
|
sl@0
|
882 |
typedef typename phoenix::as_actor<K>::type k_t;
|
sl@0
|
883 |
typedef typename phoenix::as_actor<L>::type l_t;
|
sl@0
|
884 |
typedef typename phoenix::as_actor<M>::type m_t;
|
sl@0
|
885 |
typedef typename phoenix::as_actor<N>::type n_t;
|
sl@0
|
886 |
typedef phoenix::tuple<
|
sl@0
|
887 |
a_t, b_t, c_t, d_t, e_t, f_t, g_t, h_t, i_t, j_t,
|
sl@0
|
888 |
k_t, l_t, m_t, n_t
|
sl@0
|
889 |
> actor_tuple_t;
|
sl@0
|
890 |
|
sl@0
|
891 |
return init_closure_parser<DerivedT2, actor_tuple_t>(
|
sl@0
|
892 |
aux_derived(),
|
sl@0
|
893 |
actor_tuple_t(
|
sl@0
|
894 |
phoenix::as_actor<A>::convert(a),
|
sl@0
|
895 |
phoenix::as_actor<B>::convert(b),
|
sl@0
|
896 |
phoenix::as_actor<C>::convert(c),
|
sl@0
|
897 |
phoenix::as_actor<D>::convert(d),
|
sl@0
|
898 |
phoenix::as_actor<E>::convert(e),
|
sl@0
|
899 |
phoenix::as_actor<F>::convert(f),
|
sl@0
|
900 |
phoenix::as_actor<G>::convert(g),
|
sl@0
|
901 |
phoenix::as_actor<H>::convert(h),
|
sl@0
|
902 |
phoenix::as_actor<I>::convert(i),
|
sl@0
|
903 |
phoenix::as_actor<J>::convert(j),
|
sl@0
|
904 |
phoenix::as_actor<K>::convert(k),
|
sl@0
|
905 |
phoenix::as_actor<L>::convert(l),
|
sl@0
|
906 |
phoenix::as_actor<M>::convert(m),
|
sl@0
|
907 |
phoenix::as_actor<N>::convert(n)
|
sl@0
|
908 |
)
|
sl@0
|
909 |
);
|
sl@0
|
910 |
}
|
sl@0
|
911 |
|
sl@0
|
912 |
template <
|
sl@0
|
913 |
typename A, typename B, typename C, typename D, typename E,
|
sl@0
|
914 |
typename F, typename G, typename H, typename I, typename J,
|
sl@0
|
915 |
typename K, typename L, typename M, typename N, typename O
|
sl@0
|
916 |
>
|
sl@0
|
917 |
init_closure_parser<
|
sl@0
|
918 |
DerivedT2,
|
sl@0
|
919 |
phoenix::tuple<
|
sl@0
|
920 |
typename phoenix::as_actor<A>::type,
|
sl@0
|
921 |
typename phoenix::as_actor<B>::type,
|
sl@0
|
922 |
typename phoenix::as_actor<C>::type,
|
sl@0
|
923 |
typename phoenix::as_actor<D>::type,
|
sl@0
|
924 |
typename phoenix::as_actor<E>::type,
|
sl@0
|
925 |
typename phoenix::as_actor<F>::type,
|
sl@0
|
926 |
typename phoenix::as_actor<G>::type,
|
sl@0
|
927 |
typename phoenix::as_actor<H>::type,
|
sl@0
|
928 |
typename phoenix::as_actor<I>::type,
|
sl@0
|
929 |
typename phoenix::as_actor<J>::type,
|
sl@0
|
930 |
typename phoenix::as_actor<K>::type,
|
sl@0
|
931 |
typename phoenix::as_actor<L>::type,
|
sl@0
|
932 |
typename phoenix::as_actor<M>::type,
|
sl@0
|
933 |
typename phoenix::as_actor<N>::type,
|
sl@0
|
934 |
typename phoenix::as_actor<O>::type
|
sl@0
|
935 |
>
|
sl@0
|
936 |
>
|
sl@0
|
937 |
operator()(
|
sl@0
|
938 |
A const &a, B const &b, C const &c, D const &d, E const &e,
|
sl@0
|
939 |
F const &f, G const &g, H const &h, I const &i, J const &j,
|
sl@0
|
940 |
K const &k, L const &l, M const &m, N const &n, O const &o
|
sl@0
|
941 |
) const
|
sl@0
|
942 |
{
|
sl@0
|
943 |
typedef typename phoenix::as_actor<A>::type a_t;
|
sl@0
|
944 |
typedef typename phoenix::as_actor<B>::type b_t;
|
sl@0
|
945 |
typedef typename phoenix::as_actor<C>::type c_t;
|
sl@0
|
946 |
typedef typename phoenix::as_actor<D>::type d_t;
|
sl@0
|
947 |
typedef typename phoenix::as_actor<E>::type e_t;
|
sl@0
|
948 |
typedef typename phoenix::as_actor<F>::type f_t;
|
sl@0
|
949 |
typedef typename phoenix::as_actor<G>::type g_t;
|
sl@0
|
950 |
typedef typename phoenix::as_actor<H>::type h_t;
|
sl@0
|
951 |
typedef typename phoenix::as_actor<I>::type i_t;
|
sl@0
|
952 |
typedef typename phoenix::as_actor<J>::type j_t;
|
sl@0
|
953 |
typedef typename phoenix::as_actor<K>::type k_t;
|
sl@0
|
954 |
typedef typename phoenix::as_actor<L>::type l_t;
|
sl@0
|
955 |
typedef typename phoenix::as_actor<M>::type m_t;
|
sl@0
|
956 |
typedef typename phoenix::as_actor<N>::type n_t;
|
sl@0
|
957 |
typedef typename phoenix::as_actor<O>::type o_t;
|
sl@0
|
958 |
typedef phoenix::tuple<
|
sl@0
|
959 |
a_t, b_t, c_t, d_t, e_t, f_t, g_t, h_t, i_t, j_t,
|
sl@0
|
960 |
k_t, l_t, m_t, n_t, o_t
|
sl@0
|
961 |
> actor_tuple_t;
|
sl@0
|
962 |
|
sl@0
|
963 |
return init_closure_parser<DerivedT2, actor_tuple_t>(
|
sl@0
|
964 |
aux_derived(),
|
sl@0
|
965 |
actor_tuple_t(
|
sl@0
|
966 |
phoenix::as_actor<A>::convert(a),
|
sl@0
|
967 |
phoenix::as_actor<B>::convert(b),
|
sl@0
|
968 |
phoenix::as_actor<C>::convert(c),
|
sl@0
|
969 |
phoenix::as_actor<D>::convert(d),
|
sl@0
|
970 |
phoenix::as_actor<E>::convert(e),
|
sl@0
|
971 |
phoenix::as_actor<F>::convert(f),
|
sl@0
|
972 |
phoenix::as_actor<G>::convert(g),
|
sl@0
|
973 |
phoenix::as_actor<H>::convert(h),
|
sl@0
|
974 |
phoenix::as_actor<I>::convert(i),
|
sl@0
|
975 |
phoenix::as_actor<J>::convert(j),
|
sl@0
|
976 |
phoenix::as_actor<K>::convert(k),
|
sl@0
|
977 |
phoenix::as_actor<L>::convert(l),
|
sl@0
|
978 |
phoenix::as_actor<M>::convert(m),
|
sl@0
|
979 |
phoenix::as_actor<N>::convert(n),
|
sl@0
|
980 |
phoenix::as_actor<O>::convert(o)
|
sl@0
|
981 |
)
|
sl@0
|
982 |
);
|
sl@0
|
983 |
}
|
sl@0
|
984 |
|
sl@0
|
985 |
#endif
|
sl@0
|
986 |
#endif
|
sl@0
|
987 |
#endif
|
sl@0
|
988 |
#endif
|
sl@0
|
989 |
};
|
sl@0
|
990 |
|
sl@0
|
991 |
~closure() {}
|
sl@0
|
992 |
};
|
sl@0
|
993 |
|
sl@0
|
994 |
///////////////////////////////////////////////////////////////////////////
|
sl@0
|
995 |
//
|
sl@0
|
996 |
// overloads for chseq_p and str_p taking in phoenix actors
|
sl@0
|
997 |
//
|
sl@0
|
998 |
///////////////////////////////////////////////////////////////////////////
|
sl@0
|
999 |
template <typename ActorT>
|
sl@0
|
1000 |
struct container_begin
|
sl@0
|
1001 |
{
|
sl@0
|
1002 |
typedef container_begin<ActorT> self_t;
|
sl@0
|
1003 |
|
sl@0
|
1004 |
template <typename TupleT>
|
sl@0
|
1005 |
struct result
|
sl@0
|
1006 |
{
|
sl@0
|
1007 |
typedef typename phoenix::actor_result<ActorT, TupleT>
|
sl@0
|
1008 |
::plain_type::iterator type;
|
sl@0
|
1009 |
};
|
sl@0
|
1010 |
|
sl@0
|
1011 |
container_begin(ActorT actor_)
|
sl@0
|
1012 |
: actor(actor_) {}
|
sl@0
|
1013 |
|
sl@0
|
1014 |
template <typename TupleT>
|
sl@0
|
1015 |
typename phoenix::actor_result<self_t, TupleT>::type
|
sl@0
|
1016 |
eval(TupleT const& /*args*/) const
|
sl@0
|
1017 |
{ return actor().begin(); }
|
sl@0
|
1018 |
|
sl@0
|
1019 |
ActorT actor;
|
sl@0
|
1020 |
};
|
sl@0
|
1021 |
|
sl@0
|
1022 |
template <typename ActorT>
|
sl@0
|
1023 |
struct container_end
|
sl@0
|
1024 |
{
|
sl@0
|
1025 |
typedef container_begin<ActorT> self_t;
|
sl@0
|
1026 |
|
sl@0
|
1027 |
template <typename TupleT>
|
sl@0
|
1028 |
struct result
|
sl@0
|
1029 |
{
|
sl@0
|
1030 |
typedef typename phoenix::actor_result<ActorT, TupleT>
|
sl@0
|
1031 |
::plain_type::iterator type;
|
sl@0
|
1032 |
};
|
sl@0
|
1033 |
|
sl@0
|
1034 |
container_end(ActorT actor_)
|
sl@0
|
1035 |
: actor(actor_) {}
|
sl@0
|
1036 |
|
sl@0
|
1037 |
template <typename TupleT>
|
sl@0
|
1038 |
typename phoenix::actor_result<self_t, TupleT>::type
|
sl@0
|
1039 |
eval(TupleT const& /*args*/) const
|
sl@0
|
1040 |
{ return actor().end(); }
|
sl@0
|
1041 |
|
sl@0
|
1042 |
ActorT actor;
|
sl@0
|
1043 |
};
|
sl@0
|
1044 |
|
sl@0
|
1045 |
template <typename BaseT>
|
sl@0
|
1046 |
inline f_chseq<
|
sl@0
|
1047 |
phoenix::actor<container_begin<phoenix::actor<BaseT> > >,
|
sl@0
|
1048 |
phoenix::actor<container_end<phoenix::actor<BaseT> > >
|
sl@0
|
1049 |
>
|
sl@0
|
1050 |
f_chseq_p(phoenix::actor<BaseT> const& a)
|
sl@0
|
1051 |
{
|
sl@0
|
1052 |
typedef phoenix::actor<container_begin<phoenix::actor<BaseT> > >
|
sl@0
|
1053 |
container_begin_t;
|
sl@0
|
1054 |
typedef phoenix::actor<container_end<phoenix::actor<BaseT> > >
|
sl@0
|
1055 |
container_end_t;
|
sl@0
|
1056 |
typedef f_chseq<container_begin_t, container_end_t> result_t;
|
sl@0
|
1057 |
|
sl@0
|
1058 |
return result_t(container_begin_t(a), container_end_t(a));
|
sl@0
|
1059 |
}
|
sl@0
|
1060 |
|
sl@0
|
1061 |
template <typename BaseT>
|
sl@0
|
1062 |
inline f_strlit<
|
sl@0
|
1063 |
phoenix::actor<container_begin<phoenix::actor<BaseT> > >,
|
sl@0
|
1064 |
phoenix::actor<container_end<phoenix::actor<BaseT> > >
|
sl@0
|
1065 |
>
|
sl@0
|
1066 |
f_str_p(phoenix::actor<BaseT> const& a)
|
sl@0
|
1067 |
{
|
sl@0
|
1068 |
typedef phoenix::actor<container_begin<phoenix::actor<BaseT> > >
|
sl@0
|
1069 |
container_begin_t;
|
sl@0
|
1070 |
typedef phoenix::actor<container_end<phoenix::actor<BaseT> > >
|
sl@0
|
1071 |
container_end_t;
|
sl@0
|
1072 |
typedef f_strlit<container_begin_t, container_end_t> result_t;
|
sl@0
|
1073 |
|
sl@0
|
1074 |
return result_t(container_begin_t(a), container_end_t(a));
|
sl@0
|
1075 |
}
|
sl@0
|
1076 |
|
sl@0
|
1077 |
}} // namespace boost::spirit
|
sl@0
|
1078 |
|
sl@0
|
1079 |
#endif
|