~ubuntu-branches/ubuntu/maverick/aspectc++/maverick

« back to all changes in this revision

Viewing changes to Puma/gen-release/step1/aspects/WinDeclSpecs.ah

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2008-04-10 17:40:52 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20080410174052-xdnsm7oi8hauyyf1
Tags: 1.0pre4~svn.20080409+dfsg-3
Fix another missing include, this time in Ag++/StdSystem.cc

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
/* Win declaration specifiers support aspect            */
24
24
/********************************************************/
25
25
 
 
26
#include "Puma/CTokens.h"
 
27
 
26
28
namespace Puma {
27
29
  class CCSyntax;
28
30
  class CCBuilder;
29
31
  class CTree;
30
 
} // namespace Puma
31
 
 
32
 
#include "Puma/CTokens.h"
33
 
 
34
 
using namespace Puma;
 
32
35
33
 
36
34
namespace Puma {
37
35
  slice class WinDeclSpecsSyntax;
53
51
  // extended declaration specifiers
54
52
  advice within (derived (syntax ())) && 
55
53
         execution ("void Puma::%::init_misc_spec()") : after () {
56
 
    tjp->that ()->_misc_spec_1.set (TOK_CDECL);
57
 
    tjp->that ()->_misc_spec_1.set (TOK_STDCALL);
58
 
    tjp->that ()->_misc_spec_1.set (TOK_FASTCALL);
 
54
    tjp->that ()->_misc_spec_1.set (Puma::TOK_CDECL);
 
55
    tjp->that ()->_misc_spec_1.set (Puma::TOK_STDCALL);
 
56
    tjp->that ()->_misc_spec_1.set (Puma::TOK_FASTCALL);
59
57
  }
60
58
  
61
59
  // extended cv qualifier
62
60
  advice within (derived (syntax ())) && 
63
61
         execution ("void Puma::%::init_cv_qual()") : after () {
64
 
    tjp->that ()->_cv_qual_1.set (TOK_CDECL);
65
 
    tjp->that ()->_cv_qual_1.set (TOK_STDCALL);
66
 
    tjp->that ()->_cv_qual_1.set (TOK_FASTCALL);
 
62
    tjp->that ()->_cv_qual_1.set (Puma::TOK_CDECL);
 
63
    tjp->that ()->_cv_qual_1.set (Puma::TOK_STDCALL);
 
64
    tjp->that ()->_cv_qual_1.set (Puma::TOK_FASTCALL);
67
65
  }
68
66
 
69
67
  // let first parse the win declaration specifiers
70
68
  advice execution ("% Puma::CSyntax::direct_declarator()") : around () {
71
 
    CTree *&result = *(CTree**)tjp->result ();
 
69
    Puma::CTree *&result = *(Puma::CTree**)tjp->result ();
72
70
    if ((tjp->that ()->parse (&JoinPoint::That::declarator_id) ||
73
 
         (tjp->that ()->parse (TOK_OPEN_ROUND) && 
 
71
         (tjp->that ()->parse (Puma::TOK_OPEN_ROUND) && 
74
72
          (tjp->that ()->parse (&JoinPoint::That::win_decl_spec),
75
73
           tjp->that ()->parse (&JoinPoint::That::declarator)) &&
76
 
          tjp->that ()->parse (TOK_CLOSE_ROUND))) &&  
 
74
          tjp->that ()->parse (Puma::TOK_CLOSE_ROUND))) &&  
77
75
        tjp->that ()->opt (
78
76
         tjp->that ()->seq (&JoinPoint::That::direct_declarator1))) 
79
77
      result = tjp->that ()->builder ().direct_declarator ();
80
78
    else
81
 
      result = (CTree*)0;
 
79
      result = (Puma::CTree*)0;
82
80
  }
83
81
 
84
82
  // let first parse the win declaration specifiers
85
83
  advice execution ("% Puma::CSyntax::direct_abst_declarator()") : around () {
86
 
    CTree *&result = *(CTree**)tjp->result ();
 
84
    Puma::CTree *&result = *(Puma::CTree**)tjp->result ();
87
85
    if ((tjp->that ()->parse (&JoinPoint::That::direct_abst_declarator1) ||
88
 
         (tjp->that ()->parse (TOK_OPEN_ROUND) && 
 
86
         (tjp->that ()->parse (Puma::TOK_OPEN_ROUND) && 
89
87
          (tjp->that ()->parse (&JoinPoint::That::win_decl_spec),
90
88
           tjp->that ()->parse (&JoinPoint::That::abst_declarator)) &&
91
 
          tjp->that ()->parse (TOK_CLOSE_ROUND))) &&  
 
89
          tjp->that ()->parse (Puma::TOK_CLOSE_ROUND))) &&  
92
90
        tjp->that ()->opt (
93
91
         tjp->that ()->seq (&JoinPoint::That::direct_abst_declarator1)))
94
92
      result = tjp->that ()->semantic ().direct_abst_declarator ();
95
93
    else
96
 
      result = (CTree*)0;
 
94
      result = (Puma::CTree*)0;
97
95
  }
98
96
 
99
97
protected:
103
101
slice class Puma::WinDeclSpecsSyntax {
104
102
public:
105
103
  // introduce new rule to class CSyntax
106
 
  virtual CTree * win_decl_spec ();
 
104
  virtual Puma::CTree * win_decl_spec ();
107
105
};
108
106
 
109
 
slice CTree * Puma::WinDeclSpecsSyntax::win_decl_spec () {
 
107
slice Puma::CTree * Puma::WinDeclSpecsSyntax::win_decl_spec () {
110
108
  static int win_decl_specs[] = { 
111
 
    TOK_CDECL, TOK_STDCALL, TOK_FASTCALL, 0 
 
109
    Puma::TOK_CDECL, Puma::TOK_STDCALL, Puma::TOK_FASTCALL, 0 
112
110
  };
113
111
  return parse (win_decl_specs) ? 
114
 
    builder ().win_decl_spec () : (CTree*)0;
 
112
    builder ().win_decl_spec () : (Puma::CTree*)0;
115
113
}
116
114
 
117
115
slice class Puma::WinDeclSpecsBuilder {
118
116
public:
119
117
  // introduce new builder rule
120
 
  virtual CTree * win_decl_spec ();
 
118
  virtual Puma::CTree * win_decl_spec ();
121
119
};
122
120
 
123
 
slice CTree * Puma::WinDeclSpecsBuilder::win_decl_spec () {
 
121
slice Puma::CTree * Puma::WinDeclSpecsBuilder::win_decl_spec () {
124
122
  return get_node ();
125
123
}
126
124