ROSE  0.9.6a
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Backend C and C++ Code Generator

Generates C or C++ Source code from the AST. More...

Collaboration diagram for Backend C and C++ Code Generator:

Classes

class  Unparser
 This class represents the Backend C++ Code Generator within ROSE. More...
 

Detailed Description

Generates C or C++ Source code from the AST.

Generates C++ source code directly from AST (this is older style code not yet rewritten to use ROSE tree traversal mechanism). Parts of this code were borrowed from the original Sage II unparser. Internally several options are available so that the generated code can either reference the user's original source code or the generated code (#line <number> <filename>; is used to optionally reference the original user's file). This is a standard practice to permit generated code to work with debuggers (used by many compilers internally).

The only user level function associated with the backend is the call to the SgProject::unparse() member function, which generates the source code associated with the internal AST. If the ASt had been transformed, then the transformations will be represented as changes between the generated code and the original input application code (user's application).