ROSE  0.9.9.139
Classes
AST Processing

Description

This is the AST Processing Mechanism for traversing the AST and computing attributes.

Authors
Markus Schordan
(preliminary versions developed by Quinlan and Kowarschik using a different algorithm for combing attributes and a single interface)

The AST Processing Mechanism allows to traverse the AST and to compute inherited and synthesized attributes. There exist 4 different interfaces:

  1. SimpleProcessing provides a pre- and postorder traversal of the AST. The user needs to implement one visit function.
  2. The TopDownProcessing - provides the computation of inherited attributes using a pre-order traversal.
  3. The BottomUpProcessing - provides the computation of synthesized attributes using a post-order traversal.
  4. The BottomUpTopDownProcessing - provides the computation of inherited and synthesized attributes.

The classes have pure virtual functions. You must inherit and implement the required methods.

Collaboration diagram for AST Processing:

Classes

class  AstSimpleProcessing
 Class for traversing the AST. More...
 
class  AstTopDownProcessing< InheritedAttributeType >
 Attribute Evaluator for inherited attributes. More...
 
class  AstBottomUpProcessing< SynthesizedAttributeType >
 Attribute Evaluator for synthesized attributes. More...
 
class  AstTopDownBottomUpProcessing< InheritedAttributeType, SynthesizedAttributeType >
 Attribute Evaluator for inherited and synthesized attributes. More...