#include <AstProcessing.h>
Inheritance diagram for AstTopDownProcessing< InheritedAttributeType >:


This class allows to compute inherited attributes on the AST. It requires an inherited attribute type as a template parameter and the implementation of the function evaluateInheritedAttribute. This function is invoked in pre-order while the AST is traversed. It can be used for passing context information down the AST.
For internal use only.
This class is derived from the SgTreeTraversal class.
Public Types | |
| typedef SgTreeTraversal< InheritedAttributeType, DummyAttribute >::SynthesizedAttributesList | SynthesizedAttributesList |
Public Member Functions | |
| void | traverse (SgNode *node, InheritedAttributeType inheritedValue) |
| evaluates attributes on the entire AST | |
| void | traverseWithinFile (SgNode *node, InheritedAttributeType inheritedValue) |
| evaluates attributes only at nodes which represent the same file as where the evaluation was started | |
Protected Member Functions | |
| virtual InheritedAttributeType | evaluateInheritedAttribute (SgNode *astNode, InheritedAttributeType inheritedValue)=0 |
| pure virtual function which must be implemented to compute the inherited attribute at a node | |
| virtual void | atTraversalStart () |
| Function called at the start of the traversal, before any node is visited; override if necessary, the default implementation is a no-op. | |
| virtual void | atTraversalEnd () |
| virtual void | destroyInheritedValue (SgNode *, InheritedAttributeType) |
Private Member Functions | |
| DummyAttribute | evaluateSynthesizedAttribute (SgNode *astNode, InheritedAttributeType inheritedValue, SynthesizedAttributesList l) |
| DummyAttribute | defaultSynthesizedAttribute (InheritedAttributeType inh) |
Friends | |
| class | AstCombinedTopDownProcessing< InheritedAttributeType > |
| class | DistributedMemoryAnalysisPreTraversal< InheritedAttributeType > |
| typedef SgTreeTraversal<InheritedAttributeType, DummyAttribute>::SynthesizedAttributesList AstTopDownProcessing< InheritedAttributeType >::SynthesizedAttributesList |
Reimplemented from SgTreeTraversal< InheritedAttributeType, SynthesizedAttributeType >.
| void AstTopDownProcessing< InheritedAttributeType >::traverse | ( | SgNode * | node, | |
| InheritedAttributeType | inheritedValue | |||
| ) |
evaluates attributes on the entire AST
| void AstTopDownProcessing< InheritedAttributeType >::traverseWithinFile | ( | SgNode * | node, | |
| InheritedAttributeType | inheritedValue | |||
| ) |
evaluates attributes only at nodes which represent the same file as where the evaluation was started
| virtual InheritedAttributeType AstTopDownProcessing< InheritedAttributeType >::evaluateInheritedAttribute | ( | SgNode * | astNode, | |
| InheritedAttributeType | inheritedValue | |||
| ) | [protected, pure virtual] |
pure virtual function which must be implemented to compute the inherited attribute at a node
Implements SgTreeTraversal< InheritedAttributeType, SynthesizedAttributeType >.
Implemented in AstCombinedTopDownProcessing< InheritedAttributeType >, and AstCombinedTopDownProcessing< I >.
| void AstTopDownProcessing< InheritedAttributeType >::atTraversalStart | ( | ) | [protected, virtual] |
Function called at the start of the traversal, before any node is visited; override if necessary, the default implementation is a no-op.
Reimplemented from SgTreeTraversal< InheritedAttributeType, SynthesizedAttributeType >.
Reimplemented in AstCombinedTopDownProcessing< InheritedAttributeType >, and AstCombinedTopDownProcessing< I >.
| void AstTopDownProcessing< InheritedAttributeType >::atTraversalEnd | ( | ) | [protected, virtual] |
Reimplemented from SgTreeTraversal< InheritedAttributeType, SynthesizedAttributeType >.
Reimplemented in AstCombinedTopDownProcessing< InheritedAttributeType >, AstSharedMemoryParallelizableTopDownProcessing< InheritedAttributeType >, AstCombinedTopDownProcessing< I >, and AstSharedMemoryParallelizableTopDownProcessing< I >.
| void AstTopDownProcessing< InheritedAttributeType >::destroyInheritedValue | ( | SgNode * | , | |
| InheritedAttributeType | ||||
| ) | [protected, virtual] |
Reimplemented in AstCombinedTopDownProcessing< InheritedAttributeType >, and AstCombinedTopDownProcessing< I >.
| DummyAttribute AstTopDownProcessing< InheritedAttributeType >::evaluateSynthesizedAttribute | ( | SgNode * | astNode, | |
| InheritedAttributeType | inheritedValue, | |||
| SynthesizedAttributesList | l | |||
| ) | [private] |
| DummyAttribute AstTopDownProcessing< InheritedAttributeType >::defaultSynthesizedAttribute | ( | InheritedAttributeType | inh | ) | [private, virtual] |
Reimplemented from SgTreeTraversal< InheritedAttributeType, SynthesizedAttributeType >.
friend class AstCombinedTopDownProcessing< InheritedAttributeType > [friend] |
friend class DistributedMemoryAnalysisPreTraversal< InheritedAttributeType > [friend] |
1.4.7