public class terminal extends symbol
| Modifier and Type | Field and Description |
|---|---|
protected static Hashtable |
_all
Table of all terminals.
|
protected static Hashtable |
_all_by_index
Table of all terminals indexed by their index number.
|
static terminal |
EOF
Special terminal for end of input.
|
static terminal |
error
special terminal used for error recovery
|
protected static int |
next_index
Static counter to assign unique index.
|
_index, _name, _stack_type, _use_count| Constructor and Description |
|---|
terminal(String nm)
Constructor with default type.
|
terminal(String nm,
String tp)
Full constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static Enumeration |
all()
Access to all terminals.
|
static terminal |
find(int indx)
Lookup a terminal by index.
|
static terminal |
find(String with_name)
Lookup a terminal by name string.
|
boolean |
is_non_term()
Report this symbol as not being a non-terminal.
|
static int |
number()
Total number of terminals.
|
String |
toString()
Convert to a string.
|
protected static Hashtable _all
protected static Hashtable _all_by_index
protected static int next_index
public static final terminal EOF
public static final terminal error
public terminal(String nm, String tp)
nm - the name of the terminal.tp - the type of the terminal.public terminal(String nm)
nm - the name of the terminal.public static Enumeration all()
public static terminal find(int indx)
public static int number()
public boolean is_non_term()
is_non_term in class symbolCopyright © 2014. All Rights Reserved.