~ubuntu-branches/ubuntu/quantal/aspectc++/quantal

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
#ifndef __ac_FIRST__var_tmp_aspectc4343_debian_Puma_gen45release_step1__
#define __ac_FIRST__var_tmp_aspectc4343_debian_Puma_gen45release_step1__
#define __ac_FIRST_FILE__var_tmp_aspectc4343_debian_Puma_gen45release_step1_inc_Puma_Syntax_h__

#ifndef __ac_h_
#define __ac_h_
#ifdef __cplusplus
namespace AC {
  typedef const char* Type;
  enum JPType { CALL = 0x0004, EXECUTION = 0x0008, CONSTRUCTION = 0x0010, DESTRUCTION = 0x0020 };
  struct Action {
    void **_args; void *_result; void *_target; void *_that; void *_fptr;
    void (*_wrapper)(Action &);
    inline void trigger () { _wrapper (*this); }
  };
  struct AnyResultBuffer {};
  template <typename T> struct ResultBuffer : public AnyResultBuffer {
    char _data[sizeof (T)];
    ~ResultBuffer () { ((T*)_data)->T::~T(); }
    operator T& () const { return *(T*)_data; }
  };
  template <typename T, typename N> struct TL {
    typedef T type; typedef N next; enum { ARGS = next::ARGS + 1 };
  };
  struct TLE { enum { ARGS = 0 }; };
  template <typename T> struct Referred { typedef T type; };
  template <typename T> struct Referred<T &> { typedef T type; };
  template <typename TL, int I> struct Arg {
    typedef typename Arg<typename TL::next, I - 1>::Type Type;
    typedef typename Referred<Type>::type ReferredType;
  };
  template <typename TL> struct Arg<TL, 0> {
    typedef typename TL::type Type;
    typedef typename Referred<Type>::type ReferredType;
  };
  template <class Aspect, int Index>
  struct CFlow {
    static int &instance () {
      static int counter = 0;
      return counter;
    }
    CFlow () { instance ()++; }
    ~CFlow () { instance ()--; }
    static bool active () { return instance () > 0; }
  };
}
inline void * operator new (__SIZE_TYPE__, AC::AnyResultBuffer *p) { return p; }
inline void operator delete (void *, AC::AnyResultBuffer *) { } // for VC++
#endif // __cplusplus
#endif // __ac_h_
#endif // __ac_FIRST__var_tmp_aspectc4343_debian_Puma_gen45release_step1__

#line 1 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/Syntax.h"

#line 56 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/inc/Puma/Syntax.h"

#ifndef __ac_fwd_ExtGnu__
#define __ac_fwd_ExtGnu__
class ExtGnu;
namespace AC {
  template <class JoinPoint>
  __attribute((always_inline)) inline void invoke_ExtGnu_ExtGnu_a0_around (JoinPoint *tjp);
  template <class JoinPoint>
  __attribute((always_inline)) inline void invoke_ExtGnu_ExtGnu_a1_after (JoinPoint *tjp);
  template <class JoinPoint>
  __attribute((always_inline)) inline void invoke_ExtGnu_ExtGnu_a2_after (JoinPoint *tjp);
  template <class JoinPoint>
  __attribute((always_inline)) inline void invoke_ExtGnu_ExtGnu_a3_around (JoinPoint *tjp);
  template <class JoinPoint>
  __attribute((always_inline)) inline void invoke_ExtGnu_ExtGnu_a4_after (JoinPoint *tjp);
  template <class JoinPoint>
  __attribute((always_inline)) inline void invoke_ExtGnu_ExtGnu_a5_after (JoinPoint *tjp);
  template <class JoinPoint>
  __attribute((always_inline)) inline void invoke_ExtGnu_ExtGnu_a6_after (JoinPoint *tjp);
  template <class JoinPoint>
  __attribute((always_inline)) inline void invoke_ExtGnu_ExtGnu_a7_before (JoinPoint *tjp);
  template <class JoinPoint>
  __attribute((always_inline)) inline void invoke_ExtGnu_ExtGnu_a8_after (JoinPoint *tjp);
  template <class JoinPoint>
  __attribute((always_inline)) inline void invoke_ExtGnu_ExtGnu_a9_after (JoinPoint *tjp);
  template <class JoinPoint>
  __attribute((always_inline)) inline void invoke_ExtGnu_ExtGnu_a10_after (JoinPoint *tjp);
  template <class JoinPoint>
  __attribute((always_inline)) inline void invoke_ExtGnu_ExtGnu_a11_after (JoinPoint *tjp);
  template <class JoinPoint>
  __attribute((always_inline)) inline void invoke_ExtGnu_ExtGnu_a12_after (JoinPoint *tjp);
  template <class JoinPoint>
  __attribute((always_inline)) inline void invoke_ExtGnu_ExtGnu_a13_after (JoinPoint *tjp);
  template <class JoinPoint>
  __attribute((always_inline)) inline void invoke_ExtGnu_ExtGnu_a14_before (JoinPoint *tjp);
  template <class JoinPoint>
  __attribute((always_inline)) inline void invoke_ExtGnu_ExtGnu_a15_before (JoinPoint *tjp);
  template <class JoinPoint>
  __attribute((always_inline)) inline void invoke_ExtGnu_ExtGnu_a16_around (JoinPoint *tjp);
}
#endif

#ifndef __ac_need__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_ExtGnu_ah__
#define __ac_need__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_ExtGnu_ah__
#endif

#ifndef __ac_fwd_CMatchSyntax__
#define __ac_fwd_CMatchSyntax__
class CMatchSyntax;
namespace AC {
  template <class JoinPoint>
  __attribute((always_inline)) inline void invoke_CMatchSyntax_CMatchSyntax_a0_around (JoinPoint *tjp);
  template <class JoinPoint>
  __attribute((always_inline)) inline void invoke_CMatchSyntax_CMatchSyntax_a1_around (JoinPoint *tjp);
  template <class JoinPoint>
  __attribute((always_inline)) inline void invoke_CMatchSyntax_CMatchSyntax_a2_around (JoinPoint *tjp);
  template <class JoinPoint>
  __attribute((always_inline)) inline void invoke_CMatchSyntax_CMatchSyntax_a3_around (JoinPoint *tjp);
  template <class JoinPoint>
  __attribute((always_inline)) inline void invoke_CMatchSyntax_CMatchSyntax_a4_around (JoinPoint *tjp);
  template <class JoinPoint>
  __attribute((always_inline)) inline void invoke_CMatchSyntax_CMatchSyntax_a5_after (JoinPoint *tjp);
  template <class JoinPoint>
  __attribute((always_inline)) inline void invoke_CMatchSyntax_CMatchSyntax_a6_after (JoinPoint *tjp);
  template <class JoinPoint>
  __attribute((always_inline)) inline void invoke_CMatchSyntax_CMatchSyntax_a7_around (JoinPoint *tjp);
  template <class JoinPoint>
  __attribute((always_inline)) inline void invoke_CMatchSyntax_CMatchSyntax_a8_around (JoinPoint *tjp);
  template <class JoinPoint>
  __attribute((always_inline)) inline void invoke_CMatchSyntax_CMatchSyntax_a9_around (JoinPoint *tjp);
  template <class JoinPoint>
  __attribute((always_inline)) inline void invoke_CMatchSyntax_CMatchSyntax_a10_around (JoinPoint *tjp);
  template <class JoinPoint>
  __attribute((always_inline)) inline void invoke_CMatchSyntax_CMatchSyntax_a11_around (JoinPoint *tjp);
  template <class JoinPoint>
  __attribute((always_inline)) inline void invoke_CMatchSyntax_CMatchSyntax_a12_around (JoinPoint *tjp);
  template <class JoinPoint>
  __attribute((always_inline)) inline void invoke_CMatchSyntax_CMatchSyntax_a13_around (JoinPoint *tjp);
  template <class JoinPoint>
  __attribute((always_inline)) inline void invoke_CMatchSyntax_CMatchSyntax_a14_around (JoinPoint *tjp);
  template <class JoinPoint>
  __attribute((always_inline)) inline void invoke_CMatchSyntax_CMatchSyntax_a15_around (JoinPoint *tjp);
  template <class JoinPoint>
  __attribute((always_inline)) inline void invoke_CMatchSyntax_CMatchSyntax_a16_around (JoinPoint *tjp);
  template <class JoinPoint>
  __attribute((always_inline)) inline void invoke_CMatchSyntax_CMatchSyntax_a17_around (JoinPoint *tjp);
  template <class JoinPoint>
  __attribute((always_inline)) inline void invoke_CMatchSyntax_CMatchSyntax_a18_around (JoinPoint *tjp);
  template <class JoinPoint>
  __attribute((always_inline)) inline void invoke_CMatchSyntax_CMatchSyntax_a19_around (JoinPoint *tjp);
  template <class JoinPoint>
  __attribute((always_inline)) inline void invoke_CMatchSyntax_CMatchSyntax_a20_around (JoinPoint *tjp);
  template <class JoinPoint>
  __attribute((always_inline)) inline void invoke_CMatchSyntax_CMatchSyntax_a21_around (JoinPoint *tjp);
  template <class JoinPoint>
  __attribute((always_inline)) inline void invoke_CMatchSyntax_CMatchSyntax_a22_around (JoinPoint *tjp);
  template <class JoinPoint>
  __attribute((always_inline)) inline void invoke_CMatchSyntax_CMatchSyntax_a23_around (JoinPoint *tjp);
  template <class JoinPoint>
  __attribute((always_inline)) inline void invoke_CMatchSyntax_CMatchSyntax_a24_around (JoinPoint *tjp);
  template <class JoinPoint>
  __attribute((always_inline)) inline void invoke_CMatchSyntax_CMatchSyntax_a25_before (JoinPoint *tjp);
}
#endif

#ifndef __ac_need__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_CMatchSyntax_ah__
#define __ac_need__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_CMatchSyntax_ah__
#endif

#line 1 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/Syntax.h"
// This file is part of PUMA.
// Copyright (C) 1999-2003  The PUMA developer team.
//                                                                
// This program is free software;  you can redistribute it and/or 
// modify it under the terms of the GNU General Public License as 
// published by the Free Software Foundation; either version 2 of 
// the License, or (at your option) any later version.            
//                                                                
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of 
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the  
// GNU General Public License for more details.                   
//                                                                
// You should have received a copy of the GNU General Public      
// License along with this program; if not, write to the Free     
// Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
// MA  02111-1307  USA                                            

#ifndef __Syntax_h__
#define __Syntax_h__

#include "Puma/Token.h"
#include "Puma/Builder.h"
//#include "Puma/Semantic.h"
#include "Puma/ErrorSink.h"
#include "Puma/TokenProvider.h"

namespace Puma {

class Semantic;
class Config;
class CTree;


#line 201 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/inc/Puma/Syntax.h"
} // closed Puma
class CCExprResolve;
class CExprResolve;
class WinIfExists;
class WinImportHandler;
class WinMacros;
class WinAsm;
class WinDeclSpecs;
class WinMemberExplSpec;
class WinTypeKeywords;
class WinFriend;
class ExtAC;
class ExtACBuilderCoupling;
class ExtACSyntaxCoupling;
class ExtACTree;
class ExtACKeywords;
class ExtGnu;
class PragmaOnceUnitState;
class PragmaOnce;
class CMatchSyntax;
namespace Puma {

#line 34 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/Syntax.h"
class Syntax {
#line 226 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/inc/Puma/Syntax.h"
  friend class ::CCExprResolve;
  friend class ::CExprResolve;
  friend class ::WinIfExists;
  friend class ::WinImportHandler;
  friend class ::WinMacros;
  friend class ::WinAsm;
  friend class ::WinDeclSpecs;
  friend class ::WinMemberExplSpec;
  friend class ::WinTypeKeywords;
  friend class ::WinFriend;
  friend class ::ExtAC;
  friend class ::ExtACBuilderCoupling;
  friend class ::ExtACSyntaxCoupling;
  friend class ::ExtACTree;
  friend class ::ExtACKeywords;
  friend class ::ExtGnu;
  friend class ::PragmaOnceUnitState;
  friend class ::PragmaOnce;
  friend class ::CMatchSyntax;

#line 34 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/Syntax.h"

  Token *_problem_token;
  bool _have_error;

  Builder &_builder;
  Semantic &_semantic;

public:
  TokenProvider *token_provider;

public: 
  struct State : public TokenProvider::State {
#line 260 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/inc/Puma/Syntax.h"
  friend class ::CCExprResolve;
  friend class ::CExprResolve;
  friend class ::WinIfExists;
  friend class ::WinImportHandler;
  friend class ::WinMacros;
  friend class ::WinAsm;
  friend class ::WinDeclSpecs;
  friend class ::WinMemberExplSpec;
  friend class ::WinTypeKeywords;
  friend class ::WinFriend;
  friend class ::ExtAC;
  friend class ::ExtACBuilderCoupling;
  friend class ::ExtACSyntaxCoupling;
  friend class ::ExtACTree;
  friend class ::ExtACKeywords;
  friend class ::ExtGnu;
  friend class ::PragmaOnceUnitState;
  friend class ::PragmaOnce;
  friend class ::CMatchSyntax;

#line 45 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/Syntax.h"

    State () {}
    State (int) {}
    State (const TokenProvider::State &s) : TokenProvider::State (s) {}
  };

protected:
  Syntax (Builder &, Semantic &);
  virtual ~Syntax () {}

public:
  CTree *run (TokenProvider &);
  template <class T> CTree *run (TokenProvider &, CTree *(T::*)());
  
#line 296 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/inc/Puma/Syntax.h"


template <typename TResult, typename TThat, typename TTarget, typename TArgs> struct TJP__ZN4Puma6Syntax9configureERN4PumaE6Config_0 {
  typedef TJP__ZN4Puma6Syntax9configureERN4PumaE6Config_0 __TJP;
  typedef TResult Result;
  typedef TThat   That;
  typedef TTarget Target;
  enum { ARGS = TArgs::ARGS };
  template <int I> struct Arg : AC::Arg<TArgs, I> {};
  static const int JPID = 54;
  static const AC::JPType JPTYPE = (AC::JPType)8;
  struct Res {
    typedef TResult Type;
    typedef TResult ReferredType;
  };

  void *_args[ARGS];

  inline void *arg (int n) {return _args[n];}
  template <int I> typename Arg<I>::ReferredType *arg () {
    return (typename Arg<I>::ReferredType*)arg (I);
  }

struct Binding_CMatchSyntax_CMatchSyntax_a25_before {
  typedef __TJP TJP;
  template <int I, int DUMMY = 0> struct Arg {
    void val (TJP *tjp) {} // for VC7
  };
  template <int DUMMY> struct Arg<0, DUMMY> {
    static typename TJP::template Arg<0>::ReferredType &val (TJP *tjp) { return *tjp->template arg<0> (); }
  };
};
struct Binding_ExtGnu_ExtGnu_a15_before {
  typedef __TJP TJP;
  template <int I, int DUMMY = 0> struct Arg {
    void val (TJP *tjp) {} // for VC7
  };
  template <int DUMMY> struct Arg<0, DUMMY> {
    static typename TJP::template Arg<0>::ReferredType &val (TJP *tjp) { return *tjp->template arg<0> (); }
  };
};
};


#line 58 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/Syntax.h"
virtual void configure (Config & arg0) 
#line 343 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/inc/Puma/Syntax.h"
{
  typedef TJP__ZN4Puma6Syntax9configureERN4PumaE6Config_0< void, ::Puma::Syntax , ::Puma::Syntax ,  AC::TL< ::Puma::Config & , AC::TLE > > __TJP;
    __TJP tjp;
  tjp._args[0] = (void*)&arg0;
  AC::invoke_CMatchSyntax_CMatchSyntax_a25_before<__TJP> (&tjp);
  AC::invoke_ExtGnu_ExtGnu_a15_before<__TJP> (&tjp);
    this->__exec_old_configure(arg0);
  
}
__attribute__((always_inline)) inline void __exec_old_configure(::Puma::Config & )
#line 58 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/Syntax.h"
{}
  TokenProvider *provider () const { return token_provider; }
  Token *problem () const;
  bool error () const;
  bool look_ahead (int, unsigned = 1);
  bool look_ahead (int*, unsigned = 1);
  inline int look_ahead () const;
  inline bool consume ();

protected:
  template <class T> bool parse (CTree *(T::*)());
  template <class T> bool seq (CTree *(T::*)());
  template <class T> bool seq (bool (T::*)());
  template <class T> bool list (CTree *(T::*)(), int, bool = false);
  template <class T> bool list (CTree *(T::*)(), int*, bool = false);
  template <class T> bool list (bool (T::*)(), int, bool = false);
  template <class T> bool list (bool (T::*)(), int*, bool = false);
  template <class T> bool catch_error (CTree *(T::*)(), const char*, int*, int*);
  bool parse (int);
  bool parse (int *);
  bool parse_token (int);
  bool opt (bool) const;

protected:
  Builder &builder () const;
  Semantic &semantic () const;

protected:
  // initial parse rule
  virtual CTree *trans_unit ();

  // handle a compiler directive token
  virtual void handle_directive ();

protected:
  State save_state ();
  void forget_state ();
  void restore_state ();
  void restore_state (State);
  void set_state (State);

  bool accept (CTree *, State);

  Token *locate_token ();
  void skip ();
  void skip_block (int, int);
  void skip_curly_block ();
  void skip_round_block ();
  void parse_block (int, int);
  void parse_curly_block ();
  void parse_round_block ();
  bool skip (int, bool = true);
  bool skip (int *, bool = true);
  bool is_in (int, int *) const;
};

inline Syntax::Syntax (Builder &b, Semantic &s) : 
  _problem_token ((Token*)0), 
  _have_error (false),
  _builder (b),
  _semantic (s) {
}

template <class T> 
CTree *Syntax::run (TokenProvider &tp, CTree *(T::*rule)()) {
  TokenProvider *tp_save = token_provider;
  token_provider = &tp;
  _have_error = false;
  _problem_token = (Token*)0;
  locate_token ();
  CTree *result = parse (rule) ? builder ().Top () : (CTree*)0;
  if (result) builder ().Pop ();
  token_provider = tp_save;
  return result;
}


inline int Syntax::look_ahead () const {
  Token *token = token_provider->current ();
  return token ? token->type () : 0;
}

inline bool Syntax::consume () {
  Token *t = token_provider->current ();
  _problem_token = (Token*)0;
  token_provider->next ();
  locate_token ();
  builder ().Push (builder ().token (t));
  return true;
}
 

// Workaround for (old) Puma overload resolution problem
#ifndef __puma
inline bool Syntax::parse (int token_type) { return parse_token (token_type); }
#endif 

inline bool Syntax::opt (bool) const { return true; }
inline bool Syntax::error () const { return _have_error; }
inline Token *Syntax::problem () const { return _problem_token; }
inline Builder &Syntax::builder () const { return _builder; }
inline Semantic &Syntax::semantic () const { return _semantic; }

inline CTree *Syntax::trans_unit () { return (CTree*)0; }

inline void Syntax::handle_directive () {
  while (token_provider->current () &&
         token_provider->current ()->is_directive ()) 
    token_provider->next ();
}

#ifndef __puma

template <class T> 
inline bool Syntax::parse (CTree *(T::*rule)()) {
  State s = save_state ();
  return accept ((((T*)this)->*rule) (), s);
}

template <class T> 
inline bool Syntax::seq (CTree *(T::*rule)()) {
  if (! parse (rule))
    return false;
  while (parse (rule));
  return true;
}

template <class T> 
inline bool Syntax::seq ( bool (T::*rule)()) {
  if (!(((T*)this)->*rule) ())
    return false;
  while ((((T*)this)->*rule) ());
  return true;
}

template <class T> 
inline bool Syntax::list (CTree *(T::*rule)(), int token_type, bool end_sep) {
  if (! parse (rule))
    return false;
  while (parse (token_type))
    if (! parse (rule))
      return end_sep ? true : false;
  return true;
}

template <class T> 
inline bool Syntax::list (bool (T::*rule)(), int token_type, bool end_sep) {
  if (! (((T*)this)->*rule) ())
    return false;
  while (parse (token_type))
    if (! (((T*)this)->*rule) ())
      return end_sep ? true : false;
  return true;
}

template <class T> 
inline bool Syntax::list (CTree *(T::*rule)(), int *token_type_set, bool end_sep) {
  if (! parse (rule))
    return false;
  while (parse (token_type_set))
    if (! parse (rule))
      return end_sep ? true : false;
  return true;
}

template <class T> 
inline bool Syntax::list (bool (T::*rule)(), int *token_type_set, bool end_sep) {
  if (! (((T*)this)->*rule) ())
    return false;
  while (parse (token_type_set))
    if (! (((T*)this)->*rule) ())
      return end_sep ? true : false;
  return true;
}

template <class T> 
bool Syntax::catch_error (CTree *(T::*rule)(), const char *msg,
                          int *finish_tokens, int *skip_tokens) {
  Token *current_pos, *token;
  int index;
  
  current_pos = token_provider->current ();
  if (! current_pos || is_in (current_pos->type (), finish_tokens))
    return false;

  index = ((ErrorCollector&)builder ().err ()).index ();
  if (parse (rule))
    return true;
    
  _have_error = true;
  token = problem () ? problem () : current_pos;
  builder ().Push (builder ().error ());

  // if there is no detailed error message generate a standard message
  if (index == ((ErrorCollector&)builder ().err ()).index ())
    builder ().err () << sev_error << token->location () << msg
      << " near token `" << token->text () << "'" << endMessage;

  skip (skip_tokens, false);
  return true;
}

#endif /* __puma */


} // namespace Puma

#endif /* __Syntax_h__ */

#line 564 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/inc/Puma/Syntax.h"

#ifdef __ac_FIRST_FILE__var_tmp_aspectc4343_debian_Puma_gen45release_step1_inc_Puma_Syntax_h__
#ifdef __ac_need__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_CCExprResolveCC_ah__
#ifndef __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_CCExprResolveCC_ah__
#define __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_CCExprResolveCC_ah__
#include "CCExprResolveCC.ah"
#endif
#ifndef __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_ExtACTree_ah__
#define __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_ExtACTree_ah__
#include "ExtACTree.ah"
#endif
#ifndef __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_ExtGnu_ah__
#define __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_ExtGnu_ah__
#include "ExtGnu.ah"
#endif
#endif
#ifdef __ac_need__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_CCExprResolveH_ah__
#ifndef __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_CCExprResolveH_ah__
#define __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_CCExprResolveH_ah__
#include "CCExprResolveH.ah"
#endif
#endif
#ifdef __ac_need__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_CExprResolveCC_ah__
#ifndef __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_CExprResolveCC_ah__
#define __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_CExprResolveCC_ah__
#include "CExprResolveCC.ah"
#endif
#ifndef __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_ExtACTree_ah__
#define __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_ExtACTree_ah__
#include "ExtACTree.ah"
#endif
#ifndef __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_ExtGnu_ah__
#define __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_ExtGnu_ah__
#include "ExtGnu.ah"
#endif
#endif
#ifdef __ac_need__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_CExprResolveH_ah__
#ifndef __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_CExprResolveH_ah__
#define __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_CExprResolveH_ah__
#include "CExprResolveH.ah"
#endif
#endif
#ifdef __ac_need__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_WinIfExists_ah__
#ifndef __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_WinIfExists_ah__
#define __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_WinIfExists_ah__
#include "WinIfExists.ah"
#endif
#endif
#ifdef __ac_need__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_WinImportHandler_ah__
#ifndef __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_WinImportHandler_ah__
#define __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_WinImportHandler_ah__
#include "WinImportHandler.ah"
#endif
#endif
#ifdef __ac_need__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_WinMacros_ah__
#ifndef __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_WinMacros_ah__
#define __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_WinMacros_ah__
#include "WinMacros.ah"
#endif
#ifndef __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_PragmaOnceUnitState_ah__
#define __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_PragmaOnceUnitState_ah__
#include "PragmaOnceUnitState.ah"
#endif
#endif
#ifdef __ac_need__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_WinAsm_ah__
#ifndef __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_WinAsm_ah__
#define __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_WinAsm_ah__
#include "WinAsm.ah"
#endif
#ifndef __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_ExtACTree_ah__
#define __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_ExtACTree_ah__
#include "ExtACTree.ah"
#endif
#endif
#ifdef __ac_need__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_WinDeclSpecs_ah__
#ifndef __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_WinDeclSpecs_ah__
#define __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_WinDeclSpecs_ah__
#include "WinDeclSpecs.ah"
#endif
#endif
#ifdef __ac_need__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_WinMemberExplSpec_ah__
#ifndef __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_WinMemberExplSpec_ah__
#define __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_WinMemberExplSpec_ah__
#include "WinMemberExplSpec.ah"
#endif
#endif
#ifdef __ac_need__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_WinTypeKeywords_ah__
#ifndef __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_WinTypeKeywords_ah__
#define __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_WinTypeKeywords_ah__
#include "WinTypeKeywords.ah"
#endif
#endif
#ifdef __ac_need__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_WinFriend_ah__
#ifndef __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_WinFriend_ah__
#define __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_WinFriend_ah__
#include "WinFriend.ah"
#endif
#endif
#ifdef __ac_need__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_ExtAC_ah__
#ifndef __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_ExtAC_ah__
#define __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_ExtAC_ah__
#include "ExtAC.ah"
#endif
#ifndef __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_ExtACTree_ah__
#define __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_ExtACTree_ah__
#include "ExtACTree.ah"
#endif
#ifndef __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_ExtACKeywords_ah__
#define __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_ExtACKeywords_ah__
#include "ExtACKeywords.ah"
#endif
#ifndef __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_ExtGnu_ah__
#define __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_ExtGnu_ah__
#include "ExtGnu.ah"
#endif
#ifndef __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_PragmaOnceUnitState_ah__
#define __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_PragmaOnceUnitState_ah__
#include "PragmaOnceUnitState.ah"
#endif
#ifndef __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_CMatchSyntax_ah__
#define __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_CMatchSyntax_ah__
#include "CMatchSyntax.ah"
#endif
#endif
#ifdef __ac_need__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_ExtACBuilderH_ah__
#ifndef __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_ExtACBuilderH_ah__
#define __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_ExtACBuilderH_ah__
#include "ExtACBuilderH.ah"
#endif
#endif
#ifdef __ac_need__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_ExtACBuilderCC_ah__
#ifndef __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_ExtACBuilderCC_ah__
#define __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_ExtACBuilderCC_ah__
#include "ExtACBuilderCC.ah"
#endif
#ifndef __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_ExtACTree_ah__
#define __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_ExtACTree_ah__
#include "ExtACTree.ah"
#endif
#endif
#ifdef __ac_need__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_ExtACSyntaxH_ah__
#ifndef __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_ExtACSyntaxH_ah__
#define __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_ExtACSyntaxH_ah__
#include "ExtACSyntaxH.ah"
#endif
#endif
#ifdef __ac_need__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_ExtACSyntaxCC_ah__
#ifndef __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_ExtACSyntaxCC_ah__
#define __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_ExtACSyntaxCC_ah__
#include "ExtACSyntaxCC.ah"
#endif
#endif
#ifdef __ac_need__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_ExtACTree_ah__
#ifndef __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_ExtACTree_ah__
#define __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_ExtACTree_ah__
#include "ExtACTree.ah"
#endif
#endif
#ifdef __ac_need__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_ExtACKeywords_ah__
#ifndef __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_ExtACKeywords_ah__
#define __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_ExtACKeywords_ah__
#include "ExtACKeywords.ah"
#endif
#ifndef __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_PragmaOnceUnitState_ah__
#define __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_PragmaOnceUnitState_ah__
#include "PragmaOnceUnitState.ah"
#endif
#endif
#ifdef __ac_need__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_ExtGnu_ah__
#ifndef __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_ExtACTree_ah__
#define __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_ExtACTree_ah__
#include "ExtACTree.ah"
#endif
#ifndef __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_ExtGnu_ah__
#define __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_ExtGnu_ah__
#include "ExtGnu.ah"
#endif
#endif
#ifdef __ac_need__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_ExtGnuCSemDeclSpecs_ah__
#ifndef __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_ExtACTree_ah__
#define __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_ExtACTree_ah__
#include "ExtACTree.ah"
#endif
#ifndef __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_ExtGnuCSemDeclSpecs_ah__
#define __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_ExtGnuCSemDeclSpecs_ah__
#include "ExtGnuCSemDeclSpecs.ah"
#endif
#endif
#ifdef __ac_need__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_PragmaOnceUnitState_ah__
#ifndef __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_PragmaOnceUnitState_ah__
#define __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_PragmaOnceUnitState_ah__
#include "PragmaOnceUnitState.ah"
#endif
#endif
#ifdef __ac_need__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_PragmaOnce_ah__
#ifndef __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_PragmaOnceUnitState_ah__
#define __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_PragmaOnceUnitState_ah__
#include "PragmaOnceUnitState.ah"
#endif
#ifndef __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_PragmaOnce_ah__
#define __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_PragmaOnce_ah__
#include "PragmaOnce.ah"
#endif
#endif
#ifdef __ac_need__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_TraceSyntax_ah__
#ifndef __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_TraceSyntax_ah__
#define __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_TraceSyntax_ah__
#include "TraceSyntax.ah"
#endif
#endif
#ifdef __ac_need__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_CMatchSyntax_ah__
#ifndef __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_CMatchSyntax_ah__
#define __ac_have__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_CMatchSyntax_ah__
#include "CMatchSyntax.ah"
#endif
#endif
#undef __ac_FIRST__var_tmp_aspectc4343_debian_Puma_gen45release_step1__
#undef __ac_FIRST_FILE__var_tmp_aspectc4343_debian_Puma_gen45release_step1_inc_Puma_Syntax_h__
#endif // __ac_FIRST_FILE__var_tmp_aspectc4343_debian_Puma_gen45release_step1_inc_Puma_Syntax_h__