java_cup
public class non_terminal extends symbol
Version: last updated: 11/25/95
| Field Summary | |
|---|---|
| boolean | is_embedded_action flag non-terminals created to embed action productions |
| protected static int | next_index Static counter to assign unique indexes. |
| protected static int | next_nt Static counter for creating unique non-terminal names |
| static non_terminal | START_nt special non-terminal for start symbol |
| protected static Hashtable | _all Table of all non-terminals -- elements are stored using name strings
as the key |
| protected static Hashtable | _all_by_index Table of all non terminals indexed by their index number. |
| protected terminal_set | _first_set First set for this non-terminal. |
| protected boolean | _nullable Nullability of this non terminal. |
| protected Hashtable | _productions Table of all productions with this non terminal on the LHS. |
| Constructor Summary | |
|---|---|
| non_terminal(String nm, String tp) Full constructor. | |
| non_terminal(String nm) Constructor with default type. | |
| Method Summary | |
|---|---|
| void | add_production(production prod) Add a production to our set of productions. |
| static Enumeration | all() Access to all non-terminals. |
| static void | compute_first_sets() Compute first sets for all non-terminals. |
| static void | compute_nullability() Compute nullability of all non-terminals. |
| static non_terminal | find(String with_name) lookup a non terminal by name string |
| static non_terminal | find(int indx) Lookup a non terminal by index. |
| terminal_set | first_set() First set for this non-terminal. |
| boolean | is_non_term() Indicate that this symbol is a non-terminal. |
| protected boolean | looks_nullable() Test to see if this non terminal currently looks nullable. |
| boolean | nullable() Nullability of this non terminal. |
| static int | number() Total number of non-terminals. |
| int | num_productions() Total number of productions with this non terminal on the LHS. |
| Enumeration | productions() Access to productions with this non terminal on the LHS. |
| String | toString() convert to string |
Parameters: nm the name of the non terminal. tp the type string for the non terminal.
Parameters: nm the name of the non terminal.