SgSymbol is the base class for the classes representing symbols
SgSymbol is the base class for the classes representing symbols. As with the other classes there is a 'variant()' which idetifies the subclass and an integer identifier 'id()'that is unique for each symbol. The symbols in each file are organized as a list which is accessible from the file object as 'SgFile::firstSymbol()' and the following symbol to the current symbol is located with 'next()'. Every symbol has a character string 'idetifier()' , a type()',which is described in detail below,and a statement called 'scope()' that is the statement in which declaration is scoped.(It is the control parent of the declaration statement). The statement where the variable is given by 'declaredInStmt()'. In addtion, there are functions that can be used to generate a copy of the synbol. There are three forms of the copy. The basic copy make a simple copy of the symbol table entry. The level one copy also generate new type information. The level two copy also copies the declaration body.
SgSymbol(int variant, char *identifier, SgType *t, SgStatement *scope)
SgSymbol(int variant, char *identifier, SgStatement &scope)
SgSymbol(int variant, char *identifier, SgStatement *scope)
SgSymbol(int variant, char *identifier, SgType *type, SgStatement *scope, SgSymbol *structsymb, SgSymbol *nextfield )
SgSymbol(int variant, char *name)
SgSymbol(int variant)
SgSymbol(PTR_SYMB symb)
SgSymbol(SgSymbol &)
~SgSymbol()
int variant()
int id()
char* identifier()
SgType* type()
void setType(SgType &t)
SgStatement* scope()
void setNextInScope(SgStatement *s)
SgStatement* declaredInStmt()
SgSymbol& copy()
SgSymbol& copyLevel1()
SgSymbol& copyAcrossFiles(SgStatement &where)
int attributes()
void setAttribute(int attribute)
void removeAttribute(int attribute)
void declareTheSymbol(SgStatement &st)
void declareTheSymbolWithParamList(SgStatement &st, SgExpression &parlist)
SgExpression* makeDeclExpr()
SgExpression* makeDeclExprWithParamList(SgExpression &parlist)
SgVarDeclStmt* makeVarDeclStmt()
SgVarDeclStmt* makeVarDeclStmtWithParamList(SgExpression &parlist)
SgStatement* body()
int isAssumedShapeSymbol()
int isAssumedSizeSymbol()
int isDeferedShapeSymbol()
SgStatement* declareInStmt(SgStatement *hedr_stmt)
int numberOfAttributes()
int numberOfAttributes(int type)
void* attributeValue(int i)
int attributeType(int i)
void* attributeValue(int i, int type)
void* deleteAttribute(int i)
void* deleteAttribute(int i, int type)
void addAttribute(int type, void *a, int size)
void addAttribute(int type)
void addAttribute(void *a, int size)
void addAttribute(SgAttribute *att)
Email contact: zgs@npac.syr.edu