16 template<
class InheritedAttributeType,
class SynthesizedAttributeType >
24 InheritedAttributeType inputInheritedAttribute );
28 InheritedAttributeType inputInheritedAttribute ) = 0;
32 InheritedAttributeType inputInheritedAttribute,
33 SynthesizedAttributeType inputSynthesizedAttribute ) = 0;
38 template<
class InheritedAttributeType,
class SynthesizedAttributeType >
39 SynthesizedAttributeType
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;