ROSE 0.11.145.192
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
17template<typename InheritedAttributeType>
18class AstReversePrefixInhProcessing : public AstTopDownProcessing<InheritedAttributeType> {
19 public:
21 protected:
22 virtual void setNodeSuccessors(SgNode* node, typename AstReversePrefixInhProcessing<InheritedAttributeType>::SuccessorsContainer& succContainer);
23};
24
25template<class SynthesizedAttributeType>
26class AstReversePrefixSynProcessing : public AstBottomUpProcessing<SynthesizedAttributeType> {
27 public:
29 protected:
30 virtual void setNodeSuccessors(SgNode* node, typename AstReversePrefixSynProcessing<SynthesizedAttributeType>::SuccessorsContainer & succContainer);
31};
32
33template<class InheritedAttributeType, class SynthesizedAttributeType>
34class 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
45template<class InheritedAttributeType, class SynthesizedAttributeType>
46class AstReverseBranchInhSynProcessing : public AstTopDownBottomUpProcessing<InheritedAttributeType, SynthesizedAttributeType> {
47 public:
49 protected:
50 virtual void setNodeSuccessors(SgNode* node, typename AstReverseBranchInhSynProcessing<InheritedAttributeType,SynthesizedAttributeType>::SuccessorsContainer & succContainer);
51};
52
53template<class InheritedAttributeType>
54class AstReverseBranchInhProcessing : public AstTopDownProcessing<InheritedAttributeType> {
55 public:
57 protected:
58 virtual void setNodeSuccessors(SgNode* node, typename AstReverseBranchInhProcessing<InheritedAttributeType>::SuccessorsContainer & succContainer);
59};
60
61template<class SynthesizedAttributeType>
62class 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.
83template<class InheritedAttributeType>
85{
87}
88
89template<class InheritedAttributeType>
90void
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.
97template<class SynthesizedAttributeType>
99{
101}
102
103template<class SynthesizedAttributeType>
104void
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.
111template<class InheritedAttributeType, class SynthesizedAttributeType>
113{
115}
116
117template<class InheritedAttributeType, class SynthesizedAttributeType>
118void
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.
129template<class InheritedAttributeType, class SynthesizedAttributeType>
131{
133}
134
135template<class InheritedAttributeType, class SynthesizedAttributeType>
136void
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.
143template<class InheritedAttributeType>
145{
147}
148
149template<class InheritedAttributeType>
150void
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.
157template<class SynthesizedAttributeType>
159{
161}
162
163template<class SynthesizedAttributeType>
164void
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 and synthesized attributes.
Attribute Evaluator for inherited attributes.
This class represents the base class for all IR nodes within Sage III.