ROSE
0.11.96.11
|
Attribute Evaluator for inherited attributes.
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.
Definition at line 237 of file AstProcessing.h.
#include <AstProcessing.h>
Public Types | |
typedef SgTreeTraversal< InheritedAttributeType, DummyAttribute >::SynthesizedAttributesList | SynthesizedAttributesList |
Public Types inherited from SgTreeTraversal< InheritedAttributeType, DummyAttribute > | |
typedef StackFrameVector< DummyAttribute > | 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 | |
Public Member Functions inherited from SgTreeTraversal< InheritedAttributeType, DummyAttribute > | |
DummyAttribute | traverse (SgNode *basenode, InheritedAttributeType inheritedValue, t_traverseOrder travOrder=preandpostorder) |
DummyAttribute | traverseWithinFile (SgNode *basenode, InheritedAttributeType inheritedValue, t_traverseOrder travOrder=preandpostorder) |
void | traverseInputFiles (SgProject *projectNode, InheritedAttributeType inheritedValue, t_traverseOrder travOrder=preandpostorder) |
SgTreeTraversal (const SgTreeTraversal &) | |
const SgTreeTraversal & | operator= (const SgTreeTraversal &) |
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) |
Protected Member Functions inherited from SgTreeTraversal< InheritedAttributeType, DummyAttribute > | |
virtual DummyAttribute | evaluateSynthesizedAttribute (SgNode *n, InheritedAttributeType in, SynthesizedAttributesList l)=0 |
virtual void | setNodeSuccessors (SgNode *node, SuccessorsContainer &succContainer) |
void | set_useDefaultIndexBasedTraversal (bool) |
Additional Inherited Members | |
Protected Types inherited from SgTreeTraversal< InheritedAttributeType, DummyAttribute > | |
typedef AstSuccessorsSelectors::SuccessorsContainer | SuccessorsContainer |
typedef SuccessorsContainer & | SuccessorsContainerRef |