com.inxar.syntacs.analyzer
Class ListSymbol

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

public class ListSymbol
extends AbstractSymbol

Concrete implementation of Symbol which uses a list.


Field Summary
 List list
          The value of the symbol Symbol represented as an Object.
 
Constructor Summary
ListSymbol(int type, Object value)
          Constructs the ListSymbol with the given type and given Object value as the first list item.
ListSymbol(Object value)
          Constructs the ListSymbol with the given Object value as the first List item.
 
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

list

public List list
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

ListSymbol

public ListSymbol(Object value)
Constructs the ListSymbol with the given Object value as the first List item.

ListSymbol

public ListSymbol(int type,
                  Object value)
Constructs the ListSymbol with the given type and given Object value as the first list item.
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