| java.lang.Object java_cup.symbol java_cup.terminal
terminal | public class terminal extends symbol (Code) | | This class represents a terminal symbol in the grammar. Each terminal
has a textual name, an index, and a string which indicates the type of
object it will be implemented with at runtime (i.e. the class of object
that will be returned by the scanner and pushed on the parse stack to
represent it).
version: last updated: 7/3/96 author: Frank Flannery |
EOF | public static terminal EOF(Code) | | Special terminal for end of input.
|
_all | protected static Hashtable _all(Code) | | Table of all terminals. Elements are stored using name strings as
the key
|
_all_by_index | protected static Hashtable _all_by_index(Code) | | Table of all terminals indexed by their index number.
|
error | public static terminal error(Code) | | special terminal used for error recovery
|
next_index | protected static int next_index(Code) | | Static counter to assign unique index.
|
terminal | public terminal(String nm, String tp, int precedence_side, int precedence_num)(Code) | | Full constructor.
Parameters: nm - the name of the terminal. Parameters: tp - the type of the terminal. |
terminal | public terminal(String nm, String tp)(Code) | | Constructor for non-precedented terminal
|
terminal | public terminal(String nm)(Code) | | Constructor with default type.
Parameters: nm - the name of the terminal. |
clear | public static void clear()(Code) | | |
find | public static terminal find(int indx)(Code) | | Lookup a terminal by index.
|
is_non_term | public boolean is_non_term()(Code) | | Report this symbol as not being a non-terminal.
|
number | public static int number()(Code) | | Total number of terminals.
|
precedence_num | public int precedence_num()(Code) | | get the precedence of a terminal
|
precedence_side | public int precedence_side()(Code) | | |
set_precedence | public void set_precedence(int p, int new_prec)(Code) | | set the precedence of a terminal
|
|
|