public class terminal extends symbol
| Modifier and Type | Field and Description | 
|---|---|
| protected static Hashtable<String,terminal> | _allTable of all terminals. | 
| protected static Hashtable<Integer,terminal> | _all_by_indexTable of all terminals indexed by their index number. | 
| static terminal | EOFSpecial terminal for end of input. | 
| static terminal | errorspecial terminal used for error recovery | 
| protected static int | next_indexStatic 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)Constructor for non-precedented terminal | 
| terminal(String nm,
        String tp,
        int precedence_side,
        int precedence_num)Full constructor. | 
| Modifier and Type | Method and Description | 
|---|---|
| static Enumeration<terminal> | all()Access to all terminals. | 
| static void | clear() | 
| 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. | 
| int | precedence_num()get the precedence of a terminal | 
| int | precedence_side() | 
| void | set_precedence(int p,
              int new_prec)set the precedence of a terminal | 
| String | toString()Convert to a string. | 
protected static Hashtable<String,terminal> _all
protected static Hashtable<Integer,terminal> _all_by_index
protected static int next_index
public static terminal EOF
public static terminal error
public terminal(String nm, String tp, int precedence_side, int precedence_num)
nm - the name of the terminal.tp - the type of the terminal.public terminal(String nm)
nm - the name of the terminal.public static void clear()
public static Enumeration<terminal> all()
public static terminal find(int indx)
public static int number()
public boolean is_non_term()
is_non_term in class symbolpublic int precedence_num()
public int precedence_side()
public void set_precedence(int p,
                           int new_prec)
Copyright © 2003–2016 Community Z Tools Project. All rights reserved.