AST Rewrite Mechanism
[ROSE Midend]

Collaboration diagram for AST Rewrite Mechanism:


Detailed Description

The AST Rewrite Mechanism permits the editing of an applications AST.

The AST Rewrite Mechanism permits the editing of an applications AST. Edits can include any addition, deletion, or replacement of subtrees within the AST. Using the AST rewrite system as part of a traversal of the AST is the way one builds a preprocessor. Causing a specific change to the AST implements a transformation. A preprocessor is developed which reads a user's applications to generate and Abstract Syntax Tree (AST) and implements a specific transformation of the AST, finally the AST is then written out to form source code. This is the essence of source-to-source processing. If the transformation introduces an optimization then the preprocessor is an optimizing preprocessor. The AST rewrite mechanism is an important part of the development of ROSE for a target audience of library developers and tool developers who might not have a deep compiler background.

There is only one user level function in the AST Rewrite mechanism:
AST_Rewrite::addSourceCodeString()
This function uses enum values defined within the AST_Rewrite class.


Modules

 AST_Rewrite Nested Classes
 Nested classes ...

Classes

class  AST_Rewrite
 This class represents the AST Rewrite Mechanism within ROSE.
Authors:
Quinlan, Schordan
(last checkedin by: <$Author: dquinlan $> on <$Date: 2006/04/24 00:21:32 $>.
More...


Generated on Tue Jan 31 05:32:53 2012 for ROSE by  doxygen 1.4.7