ROSE  0.11.82.0
AstReverseProcessing.h
1 // Author: Markus Schordan
2 // $Id: AstReverseProcessing.h,v 1.3 2008/01/08 02:56:38 dquinlan Exp $
3 
4 #ifndef ASTREVERSEPROCESSING_H
5 #define ASTREVERSEPROCESSING_H
6 
7 // tps (01/08/2010) Added sage3basic since this doesnt compile under gcc4.1.2
8 //#include "sage3basic.h"
9 //#include "sage3.h"
10 
11 #include "AstProcessing.h"
12 
14 // REVERSE PREFIX PROCESSING
16 
17 template<typename InheritedAttributeType>
18 class AstReversePrefixInhProcessing : public AstTopDownProcessing<InheritedAttributeType> {
19  public:
21  protected:
22  virtual void setNodeSuccessors(SgNode* node, typename AstReversePrefixInhProcessing<InheritedAttributeType>::SuccessorsContainer& succContainer);
23 };
24 
25 template<class SynthesizedAttributeType>
26 class AstReversePrefixSynProcessing : public AstBottomUpProcessing<SynthesizedAttributeType> {
27  public:
29  protected:
30  virtual void setNodeSuccessors(SgNode* node, typename AstReversePrefixSynProcessing<SynthesizedAttributeType>::SuccessorsContainer & succContainer);
31 };
32 
33 template<class InheritedAttributeType, class SynthesizedAttributeType>
34 class AstReversePrefixInhSynProcessing : public AstTopDownBottomUpProcessing<InheritedAttributeType, SynthesizedAttributeType> {
35  public:
37  protected:
38  virtual void setNodeSuccessors(SgNode* node, typename AstReversePrefixInhSynProcessing<InheritedAttributeType,SynthesizedAttributeType>::SuccessorsContainer & succContainer);
39 };
40 
42 // REVERSE BRANCH PROCESSING
44 
45 template<class InheritedAttributeType, class SynthesizedAttributeType>
46 class AstReverseBranchInhSynProcessing : public AstTopDownBottomUpProcessing<InheritedAttributeType, SynthesizedAttributeType> {
47  public:
49  protected:
50  virtual void setNodeSuccessors(SgNode* node, typename AstReverseBranchInhSynProcessing<InheritedAttributeType,SynthesizedAttributeType>::SuccessorsContainer & succContainer);
51 };
52 
53 template<class InheritedAttributeType>
54 class AstReverseBranchInhProcessing : public AstTopDownProcessing<InheritedAttributeType> {
55  public:
57  protected:
58  virtual void setNodeSuccessors(SgNode* node, typename AstReverseBranchInhProcessing<InheritedAttributeType>::SuccessorsContainer & succContainer);
59 };
60 
61 template<class SynthesizedAttributeType>
62 class AstReverseBranchSynProcessing : public AstBottomUpProcessing<SynthesizedAttributeType> {
63  public:
65  protected:
66  virtual void setNodeSuccessors(SgNode* node, typename AstReverseBranchSynProcessing<SynthesizedAttributeType>::SuccessorsContainer & succContainer);
67 };
68 
69 // Author: Markus Schordan
70 // $Id: AstReverseProcessing.C,v 1.3 2008/01/08 02:56:38 dquinlan Exp $
71 
72 // DQ (3/12/2006): This is now not required, the file name is
73 // changed to rose_config.h and is included directly by rose.h.
74 // #ifdef HAVE_CONFIG_H
75 // #include <config.h>
76 // #endif
77 
79 // REVERSE PRFIX PROCESSING
81 
82 // GB (09/25/2007): Added constructor to set flag to indicate that this is not a default traversal.
83 template<class InheritedAttributeType>
85 {
87 }
88 
89 template<class InheritedAttributeType>
90 void
92 ::setNodeSuccessors(SgNode* node, typename AstReversePrefixInhProcessing<InheritedAttributeType>::SuccessorsContainer& succContainer) {
93  AstSuccessorsSelectors::selectReversePrefixSuccessors(node,succContainer);
94 }
95 
96 // GB (09/25/2007): Added constructor to set flag to indicate that this is not a default traversal.
97 template<class SynthesizedAttributeType>
99 {
101 }
102 
103 template<class SynthesizedAttributeType>
104 void
106 ::setNodeSuccessors(SgNode* node, typename AstReversePrefixSynProcessing<SynthesizedAttributeType>::SuccessorsContainer& succContainer) {
107  AstSuccessorsSelectors::selectReversePrefixSuccessors(node,succContainer);
108 }
109 
110 // GB (09/25/2007): Added constructor to set flag to indicate that this is not a default traversal.
111 template<class InheritedAttributeType, class SynthesizedAttributeType>
113 {
115 }
116 
117 template<class InheritedAttributeType, class SynthesizedAttributeType>
118 void
120 ::setNodeSuccessors(SgNode* node, typename AstReversePrefixInhSynProcessing<InheritedAttributeType, SynthesizedAttributeType>::SuccessorsContainer& succContainer) {
121  AstSuccessorsSelectors::selectReversePrefixSuccessors(node,succContainer);
122 }
123 
125 // REVERSE BRANCH PROCESSING
127 
128 // GB (09/25/2007): Added constructor to set flag to indicate that this is not a default traversal.
129 template<class InheritedAttributeType, class SynthesizedAttributeType>
131 {
133 }
134 
135 template<class InheritedAttributeType, class SynthesizedAttributeType>
136 void
138 ::setNodeSuccessors(SgNode* node, typename AstReverseBranchInhSynProcessing<InheritedAttributeType, SynthesizedAttributeType>::SuccessorsContainer& succContainer) {
139  AstSuccessorsSelectors::selectReverseBranchSuccessors(node,succContainer);
140 }
141 
142 // GB (09/25/2007): Added constructor to set flag to indicate that this is not a default traversal.
143 template<class InheritedAttributeType>
145 {
147 }
148 
149 template<class InheritedAttributeType>
150 void
152 ::setNodeSuccessors(SgNode* node, typename AstReverseBranchInhProcessing<InheritedAttributeType>::SuccessorsContainer& succContainer) {
153  AstSuccessorsSelectors::selectReverseBranchSuccessors(node,succContainer);
154 }
155 
156 // GB (09/25/2007): Added constructor to set flag to indicate that this is not a default traversal.
157 template<class SynthesizedAttributeType>
159 {
161 }
162 
163 template<class SynthesizedAttributeType>
164 void
166 ::setNodeSuccessors(SgNode* node, typename AstReverseBranchSynProcessing<SynthesizedAttributeType>::SuccessorsContainer& succContainer) {
167  AstSuccessorsSelectors::selectReverseBranchSuccessors(node,succContainer);
168 }
169 
170 #include "AstReverseSimpleProcessing.h"
171 
172 #endif
Attribute Evaluator for synthesized attributes.
Attribute Evaluator for inherited attributes.
This class represents the base class for all IR nodes within Sage III.
Attribute Evaluator for inherited and synthesized attributes.