ROSE
0.9.6a
|
Class for traversing the AST. More...
#include <AstSimpleProcessing.h>
Public Member Functions | |
void | traverse (SgNode *node, Order treeTraversalOrder) |
traverse the entire AST. Order defines preorder (preorder) or postorder (postorder) traversal. Default is 'preorder'. More... | |
void | traverseWithinFile (SgNode *node, Order treeTraversalOrder) |
traverse only nodes which represent the same file as where the traversal was started More... | |
void | traverseInputFiles (SgProject *projectNode, Order treeTraversalOrder) |
traverse only nodes which represent files which were specified on the command line (=input files). More... | |
Public Member Functions inherited from SgTreeTraversal< DummyAttribute, DummyAttribute > | |
DummyAttribute | traverse (SgNode *basenode, DummyAttributeinheritedValue, t_traverseOrder travOrder=preandpostorder) |
DummyAttribute | traverseWithinFile (SgNode *basenode, DummyAttributeinheritedValue, t_traverseOrder travOrder=preandpostorder) |
void | traverseInputFiles (SgProject *projectNode, DummyAttributeinheritedValue, t_traverseOrder travOrder=preandpostorder) |
virtual | ~SgTreeTraversal () |
SgTreeTraversal () | |
SgTreeTraversal (const SgTreeTraversal &) | |
const SgTreeTraversal & | operator= (const SgTreeTraversal &) |
Protected Member Functions | |
virtual void | visit (SgNode *astNode)=0 |
this method is called at every traversed node. More... | |
virtual void | atTraversalStart () |
GB (06/04/2007): A new virtual function called at the start of the traversal, before any node is actually visited; can be used to perform a "last-minute" computation of attributes that may have changed since the constructor was executed, but are constant during the traversal itself. More... | |
virtual void | atTraversalEnd () |
Protected Member Functions inherited from SgTreeTraversal< DummyAttribute, DummyAttribute > | |
virtual void | setNodeSuccessors (SgNode *node, SuccessorsContainer &succContainer) |
void | set_useDefaultIndexBasedTraversal (bool) |
Private Member Functions | |
DummyAttribute | evaluateInheritedAttribute (SgNode *astNode, DummyAttribute inheritedValue) |
DummyAttribute | evaluateSynthesizedAttribute (SgNode *astNode, DummyAttribute inheritedValue, SynthesizedAttributesList l) |
DummyAttribute | defaultSynthesizedAttribute (DummyAttribute inheritedValue) |
Friends | |
class | AstCombinedSimpleProcessing |
Additional Inherited Members | |
Protected Types inherited from SgTreeTraversal< DummyAttribute, DummyAttribute > | |
typedef AstSuccessorsSelectors::SuccessorsContainer | SuccessorsContainer |
typedef SuccessorsContainer & | SuccessorsContainerRef |
Class for traversing the AST.
This class allows to traverse the AST in preorder or postorder. A visit function must be implemented by the user which is automaticly called by the provided AST traversal.
This class is derived from the SgTreeTraversal class.
Definition at line 59 of file AstSimpleProcessing.h.
Definition at line 63 of file AstSimpleProcessing.h.
traverse the entire AST. Order defines preorder (preorder) or postorder (postorder) traversal. Default is 'preorder'.
Function to start the traversal on the subtree defined by node.
This is the call to start the traversal on the subtree defined by node.
node | represents the root of the subtree in the AST |
treeTraversalOrder | represents the traversal order (preorder or postorder). |
traverse only nodes which represent the same file as where the traversal was started
traverse only nodes which represent files which were specified on the command line (=input files).
Function to start the traversal on the subtree defined by root (skip and nodes from other files).
This is the call to start the traversal on the subtree defined by root. This function will cause AST nodes that have a source position in any other files to be skipped (skips all header files for example).
projectNode | represents the root of the subtree in the AST |
treeTraversalOrder | represents the traversal order (preorder or postorder). |
|
protectedpure virtual |
this method is called at every traversed node.
Implemented in SageInterface::OutputLocalSymbolTables, OmpSupport::translationDriver, SlicingInfo, GlobalIndexing, AstSharedMemoryParallelizableSimpleProcessing, FindDefUseChainNode, AstCombinedSimpleProcessing, AstTextAttributesHandling, SlicingCriterion, InsertPragma, RemovalOfNodes, AstNodeVisitMapping, CheckWhichAreMarked, OmpSupport::SgVarRefExpVisitor, and MarkAll.
|
protectedvirtual |
GB (06/04/2007): A new virtual function called at the start of the traversal, before any node is actually visited; can be used to perform a "last-minute" computation of attributes that may have changed since the constructor was executed, but are constant during the traversal itself.
A no-op by default.
Reimplemented from SgTreeTraversal< DummyAttribute, DummyAttribute >.
Reimplemented in AstCombinedSimpleProcessing.
|
protectedvirtual |
Reimplemented from SgTreeTraversal< DummyAttribute, DummyAttribute >.
Reimplemented in AstCombinedSimpleProcessing, and AstSharedMemoryParallelizableSimpleProcessing.
|
privatevirtual |
|
privatevirtual |
|
privatevirtual |
Reimplemented from SgTreeTraversal< DummyAttribute, DummyAttribute >.
|
friend |
Definition at line 74 of file AstSimpleProcessing.h.