ROSE  0.9.6a
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AST Processing

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

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...
 
class  AstAttributeMechanism
 This mechanism provides capabilities to define a mapping from strings to AstAttributes. An instance of this class is accessible at each ROSE AST node in the data member 'attribute'. More...
 
class  AstAttribute
 Base class for attributes that can be attached to AST nodes using the attribute mechanism in each AST node. More...
 
class  Ast
 This class allows to use iterators on the AST; it is different to the AstProcessing classes because no visit function needs to be implemented. More...
 

Detailed 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.