Class Unparser#
Defined in File unparser.h
Class Documentation#
-
class Unparser#
Public Functions
-
Unparser(std::ostream *localStream, std::string filename, Unparser_Opt info, UnparseFormatHelp *h = NULL, UnparseDelegate *repl = NULL)#
constructor
-
virtual ~Unparser()#
destructor
-
UnparseFormat &get_output_stream()#
get the output stream wrapper
-
bool isPartOfTransformation(SgLocatedNode *n)#
true if SgLocatedNode is part of a transformation on the AST
-
bool isCompilerGenerated(SgLocatedNode *n)#
true if SgLocatedNode is part of a compiler generated part of the AST (e.g template instatiation)
-
int line_count(char*)#
counts the number of lines in one directive
-
bool containsLanguageStatements(char *fileName)#
Used to decide which include files (most often header files) will be unparsed.
-
bool includeFileIsSurroundedByExternCBraces(char *tempFilename)#
special case of extern “C” {
#include “foo.h” }
-
bool isASecondaryFile(SgStatement *stmt)#
incomplete-documentation
-
void unparseFile(SgSourceFile *file, SgUnparse_Info &info, SgScopeStatement *unparseScope = NULL)#
friend string globalUnparseToString ( SgNode* astNode );
-
int get_embedColorCodesInGeneratedCode()#
friend string globalUnparseToString ( SgNode* astNode );
-
int get_generateSourcePositionCodes()#
-
void set_embedColorCodesInGeneratedCode(int x)#
-
void set_generateSourcePositionCodes(int x)#
-
void set_resetSourcePosition(bool x)#
-
bool get_resetSourcePosition()#
-
void resetSourcePosition(SgStatement *stmt)#
Reset the Sg_File_Info to reference the unparsed (generated) source code.
-
void unparseFileUsingTokenStream(SgSourceFile *file)#
Public Members
-
Unparse_Type *u_type#
-
Unparser_Nameq *u_name#
-
Unparse_Sym *u_sym#
-
Unparse_Debug *u_debug#
-
Unparse_MOD_SAGE *u_sage#
-
Unparse_ExprStmt *u_exprStmt#
-
UnparseFortran_type *u_fortran_type#
-
FortranCodeGeneration_locatedNode *u_fortran_locatedNode#
-
Unparser_Opt opt#
Used to support unparsing of doubles and long double as x.0 instead of just x if they are whole number values.
holds all desired options for this unparser
-
int cur_index#
used to index the preprocessor list
-
bool prevdir_was_cppDeclaration#
The previous directive was a CPP statment (otherwise it was a comment)
-
SgFile *currentFile#
-
UnparseFormat cur#
This is a cursor mechanism which is not encapsulated into the curprint() member function.
-
UnparseDelegate *repl#
delegate unparser that can be used to replace the output of this unparser
-
std::list<SgStatement*> compilerGeneratedStatementQueue#
compiler generated code statements are pushed into a temporary queue so that they can be output after any statements attached to the next statements and before the next statement
Public Static Functions
-
static std::string removeUnwantedWhiteSpace(const std::string &X)#
remove unneccessary white space to build a condensed string
-
static int getNumberOfLines(std::string s)#
-
static int getColumnNumberOfEndOfString(std::string s)#
-
static void computeNameQualification(SgSourceFile *file)#
-
Unparser(std::ostream *localStream, std::string filename, Unparser_Opt info, UnparseFormatHelp *h = NULL, UnparseDelegate *repl = NULL)#