~ubuntu-branches/ubuntu/warty/aqsis/warty

« back to all changes in this revision

Viewing changes to boost/boost/spirit/attribute/closure.hpp

  • Committer: Bazaar Package Importer
  • Author(s): LaMont Jones
  • Date: 2004-08-24 07:25:04 UTC
  • Revision ID: james.westby@ubuntu.com-20040824072504-zf993vnevvisdsvb
Tags: upstream-0.9.1
ImportĀ upstreamĀ versionĀ 0.9.1

Show diffs side-by-side

added added

removed removed

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