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

« back to all changes in this revision

Viewing changes to Puma/src/parser/GnuCTree.h

  • 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:
22
22
namespace Puma {
23
23
 
24
24
// Syntax tree node hierarchy:
 
25
class   CT_GnuAsmSpec;       // derived from CTree
25
26
class   CT_GnuAsmDef;        // derived from CT_AsmDef
26
27
class   CT_GnuAsmOperand;    // derived from CTree
27
28
class     CT_GnuAsmOperands; // derived from CT_List
35
36
namespace Puma {
36
37
 
37
38
 
 
39
class CT_GnuAsmSpec : public CTree {
 
40
  CTree *_key_asm;    // CT_Token
 
41
  CTree *_open;   // CT_Token
 
42
  CTree *_expr;
 
43
  CTree *_close;  // CT_Token
 
44
 
 
45
public:
 
46
  CT_GnuAsmSpec (CTree *a, CTree *o, CTree *e, CTree *c) :
 
47
    _key_asm (a), _open (o), _expr (e), _close (c) {}
 
48
  static const char *NodeId ();
 
49
  const char *NodeName () const { return NodeId (); } 
 
50
  int Sons () const { return 4; }
 
51
  CTree *Son (int n) const {
 
52
    switch (n) {
 
53
      case 0: return _key_asm;
 
54
      case 1: return _open;
 
55
      case 2: return _expr;
 
56
      case 3: return _close;
 
57
      default: return (CTree*)0;
 
58
    }
 
59
  }
 
60
  CT_Expression *Expr () const { return (CT_Expression*)_expr; }
 
61
  void ReplaceSon (CTree *old_son, CTree *new_son) {
 
62
    if (old_son == _expr) _expr = new_son;
 
63
    else if (old_son == _key_asm) _key_asm = new_son;
 
64
    else if (old_son == _open) _open = new_son;
 
65
    else if (old_son == _close) _close = new_son;
 
66
  }
 
67
};
 
68
 
38
69
class CT_GnuAsmDef : public CT_AsmDef {
39
70
  CTree *_cvqual;
40
71
  CTree *_operands0;