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. |
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.
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.
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