class SgFile

This class provides access to the local symbol and type tables,and the top level definition,in the dep file it corresponds to

Public Fields

PTR_FILE filept

Public Methods

SgAttribute* attribute(int i)
SgExpression* firstExpression()
Returns the first expression in the file.
SgLabel* firstLabel()
Returns the first label in the file.
SgStatement* firstStatement()
Returns the first statement in the file.
SgSymbol* firstSymbol()
Returns the first symbol in the file's symbol table.
SgType* firstType()
Returns the first type in the file's type table.
SgStatement* functions(int i)
Returns the ith function in the file.
SgStatement* getStruct(int i)
Returns the ith structure in the file.
int languageType()
Returns CSrc(for C) or ForSrc(for Fortran).
SgStatement* mainProgram()
Returns the statement in the file at which the main program in located,or NULL if the main program is not located in this file.
int numberOfAttributes()
int numberOfFunctions()
Returns the number of functions in the file.
int numberOfStructs()
Returns the number of structures in the file.
void readAttributes(char *file)
void readAttributes(char *file, void * (*readfunction)(FILE *f))
void saveAttributes(char *file, void (*savefunction)(void *dat, FILE *f))
void saveAttributes(char *file)
void saveDepFile(char *dep_file)
Saves the(internal representation of the)file as a dep file with filename dep_file.
SgExpression* SgExpressionWithId(int i)
Returns the expression in the file with id i.
SgFile(char* file_name)
Provides access to (opens) the existing file, normally created by the parser
SgFile(SgFile &)
SgFile(int Language, char* file_name)
This constructor allows the user to create an empty dep file in order to insert statements into it later on
int SgFile::expressionGarbageCollection(int deleteExpressionNode, int verbose)
SgStatement* SgStatementAtLine(int lineno)
Returns the statement at line 'lineno' in the file.
SgStatement* SgStatementWithId( int id)
Returns the expression in the file with id i.
SgSymbol* SgSymbolWithId( int id)
Returns the symbol in the file with id 'id'.
SgType* SgTypeWithId( int id)
Returns the type in the file with id 'id'.
void unparse(FILE *filedisc)
Unparses the (internal representation of the)file and saves the result in the file with file descriptor filedisc
void unparsestdout()
Unparses the (internal representation of the)file to standard output.
~SgFile()
destructor

Documentation

This class provides access to the local symbol and type tables,and the top level definition,in the dep file it corresponds to. Represents files,for all languages.
PTR_FILE filept

SgFile(char* file_name)
Provides access to (opens) the existing file, normally created by the parser

SgFile(int Language, char* file_name)
This constructor allows the user to create an empty dep file in order to insert statements into it later on

~SgFile()
destructor

SgFile(SgFile &)

int languageType()
Returns CSrc(for C) or ForSrc(for Fortran).

void saveDepFile(char *dep_file)
Saves the(internal representation of the)file as a dep file with filename dep_file.

void unparse(FILE *filedisc)
Unparses the (internal representation of the)file and saves the result in the file with file descriptor filedisc

void unparsestdout()
Unparses the (internal representation of the)file to standard output.

SgStatement* mainProgram()
Returns the statement in the file at which the main program in located,or NULL if the main program is not located in this file.

SgStatement* functions(int i)
Returns the ith function in the file.

int numberOfFunctions()
Returns the number of functions in the file.

SgStatement* getStruct(int i)
Returns the ith structure in the file.

int numberOfStructs()
Returns the number of structures in the file.

SgStatement* firstStatement()
Returns the first statement in the file.

SgSymbol* firstSymbol()
Returns the first symbol in the file's symbol table.

SgType* firstType()
Returns the first type in the file's type table.

SgExpression* firstExpression()
Returns the first expression in the file.

SgLabel* firstLabel()
Returns the first label in the file.

SgExpression* SgExpressionWithId(int i)
Returns the expression in the file with id i.

SgStatement* SgStatementWithId( int id)
Returns the expression in the file with id i.

SgStatement* SgStatementAtLine(int lineno)
Returns the statement at line 'lineno' in the file.

SgSymbol* SgSymbolWithId( int id)
Returns the symbol in the file with id 'id'.

SgType* SgTypeWithId( int id)
Returns the type in the file with id 'id'.

void saveAttributes(char *file)

void saveAttributes(char *file, void (*savefunction)(void *dat, FILE *f))

void readAttributes(char *file)

void readAttributes(char *file, void * (*readfunction)(FILE *f))

int numberOfAttributes()

SgAttribute* attribute(int i)

int SgFile::expressionGarbageCollection(int deleteExpressionNode, int verbose)


This class has no child classes.

alphabetic index hierarchy of classes


Email contact: zgs@npac.syr.edu

generated by doc++