com.inxar.syntacs.analyzer
Class ObjectSymbol

java.lang.Object
  |
  +--com.inxar.syntacs.analyzer.AbstractSymbol
        |
        +--com.inxar.syntacs.analyzer.ObjectSymbol
All Implemented Interfaces:
Arboreal, Symbol

public class ObjectSymbol
extends AbstractSymbol

General concrete implementation of Symbol.


Field Summary
 Object value
          The value of the symbol Symbol represented as an Object.
 
Constructor Summary
ObjectSymbol(int type, Object value)
          Constructs the ObjectSymbol with the given type and Object value.
ObjectSymbol(Object value)
          Constructs the ObjectSymbol with the given Object value.
 
Method Summary
 boolean equals(Object other)
           
 String toString()
           
 void toTree(Tree t)
          Writes state to the given Tree.
 
Methods inherited from class com.inxar.syntacs.analyzer.AbstractSymbol
getSymbolType, setSymbolType
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

value

public Object value
The value of the symbol Symbol represented as an Object. This might be a String for identifier tokens or an Integer object for integer literals.
Constructor Detail

ObjectSymbol

public ObjectSymbol(Object value)
Constructs the ObjectSymbol with the given Object value.

ObjectSymbol

public ObjectSymbol(int type,
                    Object value)
Constructs the ObjectSymbol with the given type and Object value.
Method Detail

toString

public String toString()
Overrides:
toString in class Object

toTree

public void toTree(Tree t)
Description copied from interface: Arboreal
Writes state to the given Tree.

equals

public boolean equals(Object other)
Overrides:
equals in class Object