com.inxar.syntacs.analyzer
Class ArraySymbol
java.lang.Object
|
+--com.inxar.syntacs.analyzer.AbstractSymbol
|
+--com.inxar.syntacs.analyzer.ArraySymbol
- All Implemented Interfaces:
- Arboreal, Symbol
- public class ArraySymbol
- extends AbstractSymbol
Concrete list implementation of Symbol
which has a
fixed length.
Field Summary |
Symbol[] |
as
The array which holds the child Symbol s within
this Symbol . |
Constructor Summary |
ArraySymbol(int len)
Constructs the ArraySymbol with the given array
length given by len . |
ArraySymbol(int type,
int len)
Constructs the ArraySymbol with the given type and
array length given by len . |
Method Summary |
void |
add(Symbol s)
Adds the given symbol to the next empty slot in the
Symbol array. |
String |
toString()
|
void |
toTree(Tree t)
Writes state to the given Tree . |
as
public Symbol[] as
- The array which holds the child
Symbol
s within
this Symbol
.
ArraySymbol
public ArraySymbol(int len)
- Constructs the
ArraySymbol
with the given array
length given by len
.
ArraySymbol
public ArraySymbol(int type,
int len)
- Constructs the
ArraySymbol
with the given type and
array length given by len
.
add
public void add(Symbol s)
- Adds the given symbol to the next empty slot in the
Symbol
array.
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
.