Synopsis Description Base Classes Type Aliases Member Functions Protected Member Functions Private Member Functions Friends Derived Classes
AstTopDownProcessing Attribute evaluator for inherited attributes.
Synopsis Declared in <src/midend/astProcessing/AstProcessing.h >
template<class InheritedAttributeType>
class AstTopDownProcessing
: public SgTreeTraversal <InheritedAttributeType, DummyAttribute > Description This class allows computation of 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.
Internal: This class is derived from the SgTreeTraversal class.
Base Classes Type Aliases Member Functions Name Description traversevoid traverse( SgNode* node, InheritedAttributeType inheritedValue); evaluates attributes on the entire AST traverseWithinFilevoid traverseWithinFile( SgNode* node, InheritedAttributeType inheritedValue); evaluates attributes only at nodes which represent the same file as where the evaluation was started
Protected Member Functions Name Description atTraversalEndvirtual void atTraversalEnd(); [virtual] atTraversalStartvirtual void atTraversalStart(); [virtual] Function called at the start of the traversal, before any node is visited; override if necessary, the default implementation is a no-op. destroyInheritedValuevirtual void destroyInheritedValue( SgNode*, InheritedAttributeType); [virtual] evaluateInheritedAttributevirtual InheritedAttributeType evaluateInheritedAttribute( SgNode* astNode, InheritedAttributeType inheritedValue) = 0; [virtual] pure virtual function which must be implemented to compute the inherited attribute at a node
Private Member Functions Name Description defaultSynthesizedAttributeDummyAttribute defaultSynthesizedAttribute(InheritedAttributeType inh); evaluateSynthesizedAttributeDummyAttribute evaluateSynthesizedAttribute( SgNode* astNode, InheritedAttributeType inheritedValue, SynthesizedAttributesList l); ////////////////////////////////////////// TOP DOWN PROCESSING IMPLEMENTATION /////////////////////////////////////////////
Friends Derived Classes Created with MrDocs