|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectantlr.BaseAST
antlr.CommonAST
edu.toronto.cs.cparser.TNode
edu.toronto.cs.cparser.block.Block
public class Block
Field Summary |
---|
Fields inherited from class edu.toronto.cs.cparser.TNode |
---|
attributes, defNode, left, lineNum, marker, text, ttype, up |
Fields inherited from class antlr.BaseAST |
---|
down, right |
Constructor Summary | |
---|---|
Block()
|
|
Block(BlockType type)
|
Method Summary | |
---|---|
BlockType |
getBlockType()
|
Block |
getBody()
|
int |
getCallIndex()
|
Block |
getCond()
|
java.lang.String |
getDeclName()
A variable or function prototype declaration AST looks like: NBlock [declaration] NDeclSpecifiers NDeclarator ID NInitializer A struct/union/enum type declaration AST looks like: NBlock [declaration] NDeclSpecifiers LITERAL_struct | LITERAL_union | LITERAL_enum ID ... |
Block |
getDecls()
Deprecated. Use getLocalDecls (). |
Block |
getElseBlock()
|
Block |
getFunctionCallArgs()
|
java.lang.String |
getFunctionCallName()
A function call AST looks like either: NBlock [functionCall] NFunctionCallStmt NFunctionCall ID (call name) ... |
java.lang.String |
getFunctionCallReturnVarName()
|
java.lang.String |
getFunctionName()
A function definition AST looks like this: NBlock [functionDefinition] NFunctionDeclSpecifiers NDeclarator ID ... |
Block |
getFunctionParameterList()
|
Block |
getFunctionParameters()
A function definition AST looks like this: NBlock [functionDefinition] NFunctionDeclSpecifiers NDeclarator ID NParameterTypeList NBlock [scope] |
Block |
getFunctionReturnType()
A function definition AST looks like this: NBlock [functionDefinition] NDeclSpecifiers ... |
java.lang.String |
getGotoTargetLabel()
A goto AST looks like this: NBlock [goto] ID |
java.lang.String |
getLabel()
|
Block |
getLabelledStmt()
A labelled statement AST looks like this: NBlock [labelledStatement] NLabel NBlock |
Block |
getLocalDecls()
A scope AST looks like: NBlock [scope] NLocalDeclarations ... |
Block |
getLocalDeclsRoot()
|
Block |
getMainFunctionDef()
When called on a PROGRAM Block, finds a "main" function definition amongst its children, and returns that subtree. |
int |
getNumCallSites()
|
Block |
getReturnExpr()
|
Block |
getThenBlock()
|
Block |
getWhileBody()
|
boolean |
isNamedDeclaration()
|
boolean |
isNonVoidFunction()
|
static Block |
mergeCons(Block elt,
Block list)
|
static Block |
mergeCopy(Block list)
|
static Block |
mergeNodes(Block m,
Block n)
|
void |
setBlockType(BlockType type)
|
void |
setCallIndex(int v)
|
void |
setLabel(java.lang.String label)
|
void |
setNumCallSites(int numCallSites)
|
Methods inherited from class edu.toronto.cs.cparser.TNode |
---|
addSibling, deepCopy, deepCopyWithRightSiblings, doubleLink, firstChildOfType, firstSiblingOfType, getAttribute, getAttributesTable, getDefNode, getFirstSibling, getLastChild, getLastSibling, getLineNum, getLocalLineNum, getMarker, getNameForType, getParent, getText, getType, initialize, initialize, numberOfChildren, parentOfType, printASTNode, printTree, printTree, removeSelf, setAttribute, setDefNode, setLineNum, setMarker, setText, setTokenVocabulary, setType, toString |
Methods inherited from class antlr.CommonAST |
---|
initialize |
Methods inherited from class antlr.BaseAST |
---|
addChild, decode, encode, equals, equalsList, equalsListPartial, equalsTree, equalsTreePartial, findAll, findAllPartial, getColumn, getFirstChild, getLine, getNextSibling, getNumberOfChildren, getTokenNames, removeChildren, setFirstChild, setNextSibling, setVerboseStringConversion, toStringList, toStringTree, xmlSerialize, xmlSerializeNode, xmlSerializeRootClose, xmlSerializeRootOpen |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Block()
public Block(BlockType type)
Method Detail |
---|
public BlockType getBlockType()
public void setBlockType(BlockType type)
public Block getMainFunctionDef()
block
-
public Block getDecls()
public Block getLocalDecls()
public Block getLocalDeclsRoot()
public Block getWhileBody()
public Block getBody()
public Block getCond()
public Block getThenBlock()
public Block getElseBlock()
public java.lang.String getLabel()
public void setLabel(java.lang.String label)
public java.lang.String getFunctionName()
public Block getFunctionReturnType()
public boolean isNonVoidFunction()
public Block getFunctionParameters()
public Block getFunctionParameterList()
public java.lang.String getGotoTargetLabel()
public Block getReturnExpr()
public Block getLabelledStmt()
public boolean isNamedDeclaration()
public java.lang.String getDeclName()
public java.lang.String getFunctionCallName()
public java.lang.String getFunctionCallReturnVarName()
public Block getFunctionCallArgs()
public void setNumCallSites(int numCallSites)
public int getNumCallSites()
public void setCallIndex(int v)
public int getCallIndex()
public static Block mergeNodes(Block m, Block n)
public static Block mergeCons(Block elt, Block list)
public static Block mergeCopy(Block list)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |