16template< 
class InheritedAttributeType, 
class SynthesizedAttributeType >
 
   22          SynthesizedAttributeType traverse (
 
   24               InheritedAttributeType inputInheritedAttribute );
 
   26          virtual InheritedAttributeType evaluateInheritedAttribute (
 
   28               InheritedAttributeType inputInheritedAttribute ) = 0;
 
   30          virtual SynthesizedAttributeType evaluateSynthesizedAttribute (
 
   32               InheritedAttributeType inputInheritedAttribute,
 
   33               SynthesizedAttributeType inputSynthesizedAttribute ) = 0;
 
 
   38template< 
class InheritedAttributeType, 
class SynthesizedAttributeType >
 
   39SynthesizedAttributeType
 
   42   InheritedAttributeType inputInheritedAttribute)
 
   47     printf (
"In traverse: at node->sage_class_name() = %s \n",node->
sage_class_name());
 
   50     SynthesizedAttributeType returnAttribute;
 
   57          InheritedAttributeType localInheritedAttribute = evaluateInheritedAttribute(parentNode,inputInheritedAttribute);
 
   58          SynthesizedAttributeType localSynthesizedAttribute = traverse (parentNode,localInheritedAttribute);
 
   61               evaluateSynthesizedAttribute (parentNode,localInheritedAttribute,localSynthesizedAttribute);
 
   66          printf (
"final node in chain of parents is a %s \n",node->
sage_class_name());
 
   70     return returnAttribute;
 
This class represents the base class for all IR nodes within Sage III.
 
SgNode * get_parent() const
Access function for parent node.
 
virtual const char * sage_class_name() const
generates string representing the class name: (e.g. for SgNode returns "SgNode").