|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--mars.assembler.Symbol
Represents a MIPS program identifier to be stored in the symbol table.
Field Summary | |
static boolean |
DATA_SYMBOL
|
static boolean |
TEXT_SYMBOL
|
Constructor Summary | |
Symbol(java.lang.String name,
int address,
boolean data)
Basic constructor, creates a symbol object. |
Method Summary | |
int |
getAddress()
Returns the address of the the Symbol. |
java.lang.String |
getName()
Returns the label of the the Symbol. |
boolean |
getType()
Finds the type of symbol, text or data. |
void |
setAddress(int newAddress)
Sets (replaces) the address of the the Symbol. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final boolean TEXT_SYMBOL
public static final boolean DATA_SYMBOL
Constructor Detail |
public Symbol(java.lang.String name, int address, boolean data)
name
- The name of the Symbol.address
- The memroy address that the Symbol refers to.data
- The type of Symbol that it is.Method Detail |
public int getAddress()
public java.lang.String getName()
public boolean getType()
public void setAddress(int newAddress)
newAddress
- The revised address of the Symbol.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |