ROSE 0.11.145.147
|
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).
There are no user level functions within the backend. The only three related functions are available from the SgNode interface ( SgNode::unparseToString() ) and SgFile and SgProject interfaces ( SgFile::unparse() and SgProject::unparse(), respectively).