class SgStatement

Statements correspond to the basic source statements in Fortran90,C,C++,HPF and Java

Inheritance:

SgStatement


Public Methods

void addAttribute(void *a, int size)
no type specifed
void addAttribute(int type, void *a, int size)
void * can be NULL;
void addAttribute(int type)
void * is NULL;
void addAttribute(SgAttribute *att)
void addDeclSpec(int type)
type should be one of BIT_EXTERN BIT_INLINE, _FRIEND, BIT_STATIC
int attributeType(int i)
void* attributeValue(int i)
void* attributeValue(int i, int type)
only considering one type attribute
SgStatement* childList1(int i)
SgStatement* childList2(int i)
void clearDeclSpec()
resets the decl_specs field to zero
char* comments()
preceding comment lines
SgStatement* controlParent()
the enclosing control statement
SgStatement& copy(void)
SgStatement& copyBlock(void)
SgStatement* copyBlockPtr(void)
SgStatement& copyOne(void)
SgStatement* copyOnePtr(void)
SgStatement* copyPtr(void)
void deleteAllAttribute(int type)
void deleteAllAttribute()
void* deleteAttribute(int i, int type)
void* deleteAttribute(int i)
void deleteStmt()
SgExpression* expr(int i)
i = 0,1,2 returns the i-th expression
SgStatement* extractStmt()
SgStatement* extractStmtBody()
char* fileName()
SgStatement* firstExecutable()
SgStatement* firstStmtForDeclaration()
pass all the statement that is IMPLICIT and use
SgAttribute* getAttribute(int i, int type)
SgAttribute* getAttribute(int i)
SgStatement* getScopeForDeclare()
return where a variable can be declared
int hasAnnotations()
1 if there are annotations; 0 otherwise
int hasLabel()
returns 1 if there is a label on the stmt
int hasSymbol()
returns TRUE if tmt has symbol, FALSE otherwise.
int id()
unique id
void insertStmtAfter(SgStatement &s)
void insertStmtAfter(SgStatement &s, SgStatement &cp)
void insertStmtBefore(SgStatement &s, SgStatement &cp)
void insertStmtBefore(SgStatement &s)
int isExtern()
int isFriend()
returns non-zero if friend modifier set returns zero otherwise
int isIncludedInStmt(SgStatement &s)
int isInline()
int isStatic()
SgStatement* lastDeclaration()
SgStatement* lastExecutable()
SgStatement* lastNodeOfStmt()
SgStatement* lexNext()
the next statement in lexical order
SgStatement* lexPrev()
the previous stmt in lexical order
int lineNumber()
source text line number
SgStatement* nextInChildList()
SgStatement* nodeBefore()
int numberOfAttributes(int type)
int numberOfAttributes()
int numberOfChildrenList1()
int numberOfChildrenList2()
int numberOfComments()
number of preceeding comments.
void replaceSymbByExp(SgSymbol &symb, SgExpression &exp)
void replaceSymbBySymb(SgSymbol &symb, SgSymbol &newsymb)
void replaceSymbBySymbSameName(SgSymbol &symb, SgSymbol &newsymb)
void replaceTypeInStmt(SgType &old, SgType &newtype)
void replaceWithStmt(SgStatement &s)
void setComments(char *comments)
setComments: set ALL of the node's comments
void setControlParent(SgStatement &s)
change the control parent
void setExpression(int i, SgExpression &e)
change the i-th expression
void setId(int n)
cannot change the id info
void setLabel(SgLabel &l)
change the label
void setLabel(SgLabel * l)
void setLexNext(SgStatement &s)
change the lexical ordering
void setlineNumber(int n)
change the line number info
void setSymbol(SgSymbol &s)
change the symbol
void setVariant(int n)
change the type of the statement
SgStatement(int code, SgLabel *lab, SgSymbol *symb, SgExpression *e1, SgExpression *e2, SgExpression *e3)
SgStatement(SgStatement &)
SgStatement(PTR_BFND bif)
SgStatement(int variant)
SgSymbol* SgStatement::getSymbolInCurrentScope(char * mixstring, char * genname, char * basename, int counter)
SgSymbol* SgStatement::getSymbolInCurrentScope(char * mixstring, char * genname, char * basename)
SgSymbol* SgStatement::getSymbolInCurrentScope(char * name)
SgSymbol* SgStatement::getSymbolInCurrentScope(char * mixstring, char * genname, char * basename, int c1, int c2)
SgSymbol* SgStatement::GetSymbolInScope(SgStatement * scope, char * mixstring, char * genname, char * basename, int counter)
SgSymbol* SgStatement::GetSymbolInScope(SgStatement * scope, char * mixstring, char * genname, char * basename, int c1, int c2)
SgSymbol* SgStatement::GetSymbolInScope(SgStatement * scope, char * name)
SgSymbol* SgStatement::GetSymbolInScope(SgStatement * scope, char * mixstring, char * genname, char * basename)
void simpledeleteStmt()
void sunparse(char *buffer)
unparsing functions
SgSymbol* symbol()
returns the symbol field
char* unparse()
void unparsestdout()
int variant()
the type of the statement
~SgStatement()

Documentation

Statements correspond to the basic source statements in Fortran90,C,C++,HPF and Java
SgStatement(int variant)

SgStatement(PTR_BFND bif)

SgStatement(int code, SgLabel *lab, SgSymbol *symb, SgExpression *e1, SgExpression *e2, SgExpression *e3)

SgStatement(SgStatement &)

int lineNumber()
source text line number

int id()
unique id

int variant()
the type of the statement

SgExpression* expr(int i)
i = 0,1,2 returns the i-th expression

int hasSymbol()
returns TRUE if tmt has symbol, FALSE otherwise.

SgSymbol* symbol()
returns the symbol field. Used by loop headers to point to the loop variable symbol; Used by function and subroutine headers to point to the function or subroutine name.

char* fileName()

int hasLabel()
returns 1 if there is a label on the stmt

void setlineNumber(int n)
change the line number info

void setId(int n)
cannot change the id info

void setVariant(int n)
change the type of the statement

void setExpression(int i, SgExpression &e)
change the i-th expression

void setLabel(SgLabel &l)
change the label

void setLabel(SgLabel * l)

void setSymbol(SgSymbol &s)
change the symbol

SgStatement* lexNext()
the next statement in lexical order

SgStatement* lexPrev()
the previous stmt in lexical order

SgStatement* controlParent()
the enclosing control statement

void setLexNext(SgStatement &s)
change the lexical ordering

void setControlParent(SgStatement &s)
change the control parent

int numberOfChildrenList1()

int numberOfChildrenList2()

SgStatement* childList1(int i)

SgStatement* childList2(int i)

SgStatement* nextInChildList()

SgStatement* firstStmtForDeclaration()
pass all the statement that is IMPLICIT and use

SgStatement* lastDeclaration()

SgStatement* firstExecutable()

SgStatement* lastExecutable()

SgStatement* lastNodeOfStmt()

SgStatement* nodeBefore()

void insertStmtBefore(SgStatement &s)

void insertStmtBefore(SgStatement &s, SgStatement &cp)

void insertStmtAfter(SgStatement &s)

void insertStmtAfter(SgStatement &s, SgStatement &cp)

SgStatement* extractStmt()

SgStatement* extractStmtBody()

void replaceWithStmt(SgStatement &s)

void simpledeleteStmt()

void deleteStmt()

SgStatement& copy(void)

SgStatement* copyPtr(void)

SgStatement& copyOne(void)

SgStatement* copyOnePtr(void)

SgStatement& copyBlock(void)

SgStatement* copyBlockPtr(void)

int isIncludedInStmt(SgStatement &s)

void replaceSymbByExp(SgSymbol &symb, SgExpression &exp)

void replaceSymbBySymb(SgSymbol &symb, SgSymbol &newsymb)

void replaceSymbBySymbSameName(SgSymbol &symb, SgSymbol &newsymb)

void replaceTypeInStmt(SgType &old, SgType &newtype)

char* unparse()

void unparsestdout()

void sunparse(char *buffer)
unparsing functions

char* comments()
preceding comment lines

void setComments(char *comments)
setComments: set ALL of the node's comments

int numberOfComments()
number of preceeding comments.

int hasAnnotations()
1 if there are annotations; 0 otherwise

~SgStatement()

SgSymbol* SgStatement::GetSymbolInScope(SgStatement * scope, char * name)

SgSymbol* SgStatement::GetSymbolInScope(SgStatement * scope, char * mixstring, char * genname, char * basename)

SgSymbol* SgStatement::GetSymbolInScope(SgStatement * scope, char * mixstring, char * genname, char * basename, int counter)

SgSymbol* SgStatement::GetSymbolInScope(SgStatement * scope, char * mixstring, char * genname, char * basename, int c1, int c2)

SgSymbol* SgStatement::getSymbolInCurrentScope(char * name)

SgSymbol* SgStatement::getSymbolInCurrentScope(char * mixstring, char * genname, char * basename)

SgSymbol* SgStatement::getSymbolInCurrentScope(char * mixstring, char * genname, char * basename, int counter)

SgSymbol* SgStatement::getSymbolInCurrentScope(char * mixstring, char * genname, char * basename, int c1, int c2)

SgStatement* getScopeForDeclare()
return where a variable can be declared

int numberOfAttributes()

int numberOfAttributes(int type)

void* attributeValue(int i)

int attributeType(int i)

void* attributeValue(int i, int type)
only considering one type attribute

void addAttribute(int type, void *a, int size)
void * can be NULL;

void addAttribute(int type)
void * is NULL;

void addAttribute(void *a, int size)
no type specifed

void addAttribute(SgAttribute *att)

void* deleteAttribute(int i)

void* deleteAttribute(int i, int type)

void deleteAllAttribute()

void deleteAllAttribute(int type)

SgAttribute* getAttribute(int i)

SgAttribute* getAttribute(int i, int type)

void addDeclSpec(int type)
type should be one of BIT_EXTERN BIT_INLINE, _FRIEND, BIT_STATIC

void clearDeclSpec()
resets the decl_specs field to zero

int isFriend()
returns non-zero if friend modifier set returns zero otherwise

int isInline()

int isExtern()

int isStatic()


Direct child classes:
SgWhileStmt
SgTemplateStmt
SgSwitchStmt
SgSendStmt
SgReceiveStmt
SgProgHedrStmt
SgProcessesStmt
SgProcessDoStmt
SgProbeStmt
SgOutportStmt
SgMoveportStmt
SgModuleStmt
SgMergerStmt
SgLogIfStmt
SgInterfaceStmt
SgInportStmt
SgInheritStmt
SgIfStmt
SgForallStmt
SgForStmt
SgExecutableStatement
SgEndchannelStmt
SgEndProcessesStmt
SgDeclarationStatement
SgClassStmt
SgChannelStmt
SgCaseOptionStmt
SgBlockDataStmt
SgBasicBlockStmt
SgArithIfStmt

alphabetic index hierarchy of classes


Email contact: zgs@npac.syr.edu

generated by doc++