Class Symbol

java.lang.Object
  extended by Symbol

public class Symbol
extends java.lang.Object

Class to store assembly symbol information.


Nested Class Summary
static class Symbol.Type
           
 
Field Summary
 Symbol.Type type
          The type of the symbol.
 java.lang.Object value
          The value of the symbol.
 
Constructor Summary
Symbol()
           
Symbol(int v)
          Create a symbol with type NONE and integer value.
Symbol(java.lang.Object v)
          Create a symbol with type NONE and specified value.
Symbol(Symbol.Type t, int v)
          Create a symbol with specified type and integer value.
Symbol(Symbol.Type t, java.lang.Object v)
          Create a symbol with specified type and value.
 
Method Summary
static void main(java.lang.String[] args)
           
static java.lang.String numberFormat(int v)
          Format number representations.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

type

public Symbol.Type type
The type of the symbol.


value

public java.lang.Object value
The value of the symbol.

Constructor Detail

Symbol

public Symbol()

Symbol

public Symbol(java.lang.Object v)
Create a symbol with type NONE and specified value.

Parameters:
v - value object

Symbol

public Symbol(Symbol.Type t,
              java.lang.Object v)
Create a symbol with specified type and value.

Parameters:
t - symbol type
v - value object

Symbol

public Symbol(int v)
Create a symbol with type NONE and integer value.

Parameters:
v - integer value

Symbol

public Symbol(Symbol.Type t,
              int v)
Create a symbol with specified type and integer value.

Parameters:
t - symbol type
v - integer value
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

numberFormat

public static java.lang.String numberFormat(int v)
Format number representations.

Parameters:
v - integer value
Returns:
string representation

main

public static void main(java.lang.String[] args)