com.inxar.syntacs.analyzer
Class ConstantSymbol
java.lang.Object
|
+--com.inxar.syntacs.analyzer.AbstractSymbol
|
+--com.inxar.syntacs.analyzer.ConstantSymbol
- All Implemented Interfaces:
- Arboreal, Symbol
- public class ConstantSymbol
- extends AbstractSymbol
Concrete implementation of Symbol
which needs no
internal state other than the symbol type. This implementation
might be used for tokens like "COLON_CHAR" or other punctuation
symbols whose definition can be derived solely from its type.
Constructor Summary |
ConstantSymbol(int type)
Constructs an ConstantSymbol with the given type. |
ConstantSymbol
public ConstantSymbol(int type)
- Constructs an
ConstantSymbol
with the given type.
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