|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcoins.ast.ASTree
coins.ast.Aggregate
Declaration of a struct/union type. If the declaration appears in a type name, the type name is decomposed into the declaration and a reference to the declared structure/union.
For example, a variable declaration:
struct Point {
int x, y;
struct Color { int color; } c;
} p;
is decomposed into three declarations.
struct Color { int color; }; => ast.Struct object
struct Point { => ast.Struct object
int x, y;
struct Color c;
};
struct Point p; => ast.Declarator object
The struct declaration never appears as part of
a type name.
| Field Summary | |
protected DeclaratorList |
members
|
protected java.lang.String |
name
|
protected long |
size
|
static int |
WORD_SIZE
This variable used for computing word alignment. |
| Constructor Summary | |
Aggregate(java.lang.String aname,
DeclaratorList mem,
java.lang.String fname,
int line)
|
|
| Method Summary | |
java.lang.String |
fileName()
Returns the file name including the statement. |
ASTree |
getLeft()
Returns members. |
Declarator |
getMember(java.lang.String name)
Returns the member of the given name. |
DeclaratorList |
getMembers()
Returns the members of the struct/union data type. |
ASTree |
getRight()
Returns null. |
long |
getSize()
Returns the size (in byte) of the struct/union data type. |
int |
lineNumber()
Returns the line number of the statement. |
java.lang.String |
name()
Returns the tag name. |
void |
setLeft(ASTree _left)
|
void |
setRight(ASTree _right)
|
protected void |
setSize(long s)
|
| Methods inherited from class coins.ast.ASTree |
accept, getTag, putSeparator, rightToString, toString, toString1 |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected java.lang.String name
protected DeclaratorList members
protected long size
public static int WORD_SIZE
| Constructor Detail |
public Aggregate(java.lang.String aname,
DeclaratorList mem,
java.lang.String fname,
int line)
| Method Detail |
protected void setSize(long s)
public java.lang.String fileName()
Stmnt
fileName in interface Stmntpublic int lineNumber()
Stmnt
lineNumber in interface Stmntpublic java.lang.String name()
public ASTree getLeft()
getLeft in class ASTreepublic ASTree getRight()
getRight in class ASTreepublic void setLeft(ASTree _left)
setLeft in class ASTreepublic void setRight(ASTree _right)
setRight in class ASTreepublic long getSize()
public DeclaratorList getMembers()
public Declarator getMember(java.lang.String name)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||