com.inxar.syntacs.analyzer
Class AbstractSymbol
java.lang.Object
|
+--com.inxar.syntacs.analyzer.AbstractSymbol
- All Implemented Interfaces:
- Arboreal, Symbol
- Direct Known Subclasses:
- ArraySymbol, CharSymbol, ConstantSymbol, ListSymbol, ObjectSymbol
- public abstract class AbstractSymbol
- extends Object
- implements Symbol, Arboreal
Base implementation of Symbol
.
Methods inherited from interface com.inxar.syntacs.util.Arboreal |
toTree |
getSymbolType
public int getSymbolType()
- Description copied from interface:
Symbol
- Returns the symbol type.
- Specified by:
getSymbolType
in interface Symbol
setSymbolType
public void setSymbolType(int type)
- Description copied from interface:
Symbol
- Sets the symbol type. This method is necessary because the
design of the shift-reduce parser interacts with the symbol
such that it automatically sets the type of the symbol returned
to the parser after a reduction to the correct nonterminal
(such that the user doesn't have to worry about it).
- Specified by:
setSymbolType
in interface Symbol