| Modifier and Type | Field and Description |
|---|---|
| protected static parse_action_table | action_table
Resulting parse action table. |
| protected static long | build_end
Timing data -- when did we end state and table building |
| protected static long | check_end
Timing data -- when did we end checking |
| protected static long | dump_end
Timing data -- when did we end dumping |
| protected static long | emit_end
Timing data -- when did we finish emitting code |
| protected static int | expect_conflicts
User option -- number of conflicts to expect |
| protected static long | final_time
Timing data -- when were we completely done |
| protected static long | first_end
Timing data -- when did we end first set calculation |
| protected static boolean | include_non_terms
User option -- should we include non terminal symbol numbers in the symbol constant class. |
| protected static BufferedInputStream | input_file
Input file. |
| protected static boolean | lr_values
User option -- should generator generate code for left/right values? |
| protected static long | machine_end
Timing data -- when did we end state machine construction |
| protected static boolean | no_summary
User option -- do not print a summary. |
| protected static long | nullability_end
Timing data -- when did we end nullability calculation |
| protected static boolean | opt_compact_red
User option -- do we compact tables by making most common reduce the default action |
| protected static boolean | opt_do_debug
User option -- do we run produce extra debugging messages |
| protected static boolean | opt_dump_grammar
User option -- do we produce a dump of the grammar |
| protected static boolean | opt_dump_states
User option -- do we produce a dump of the state machine |
| protected static boolean | opt_dump_tables
User option -- do we produce a dump of the parse tables |
| protected static boolean | opt_show_timing
User option -- do we show timing information as a part of the summary |
| protected static long | parse_end
Timing data -- when did we end parsing |
| protected static PrintWriter | parser_class_file
Output file for the parser class. |
| protected static long | prelim_end
Timing data -- when did we end preliminaries |
| protected static boolean | print_progress
User option -- do we print progress messages. |
| protected static long | reduce_check_end
Timing data -- when did we end checking for non-reduced productions |
| protected static parse_reduce_table | reduce_table
Resulting reduce-goto table. |
| protected static lalr_state | start_state
Start state in the overall state machine. |
| protected static long | start_time
Timing data -- when did we start |
| protected static boolean | suppress_scanner
User option -- should generator suppress references to java_cup.runtime.Scanner for compatibility with old runtimes? |
| protected static boolean | sym_interface
User option -- should symbols be put in a class or an interface? |
| protected static PrintWriter | symbol_class_file
Output file for the symbol constant class. |
| protected static long | table_end
Timing data -- when did we end table construction |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| protected static void | |
| protected static void | |
| protected static void | |
| public static void | |
| public static void | dump_machine()
Produce a (semi-) human readable dump of the complete viable prefix recognition state machine. |
| public static void | |
| protected static void | |
| protected static void | emit_summary(boolean
did the system get far enough to generate code. output_produced)Emit a long summary message to standard error (System.err) which summarizes what was found in the specification, how many states were produced, how many conflicts were found, etc. A detailed timing summary is also produced if it was requested by the user. |
| public static void | |
| protected static void | |
| protected static void | parse_args(String[]
the command line arguments to be parsed. argv)Parse command line options and arguments to set various user-option flags and variables. |
| protected static void | |
| protected static String | plural(int
the numerical value determining plurality. val)Helper routine to optionally return a plural or non-plural ending. |
| protected static void | |
| protected static String | timestr(long
the value being formatted (in ms). time_val, long total time percentages are calculated against (in ms). total_time)Helper routine to format a decimal based display of seconds and percentage of total time given counts of milliseconds. |
| protected static void |
| action_table | back to summary |
|---|---|
| protected static parse_action_table action_table Resulting parse action table. | |
| build_end | back to summary |
|---|---|
| protected static long build_end Timing data -- when did we end state and table building | |
| check_end | back to summary |
|---|---|
| protected static long check_end Timing data -- when did we end checking | |
| dump_end | back to summary |
|---|---|
| protected static long dump_end Timing data -- when did we end dumping | |
| emit_end | back to summary |
|---|---|
| protected static long emit_end Timing data -- when did we finish emitting code | |
| expect_conflicts | back to summary |
|---|---|
| protected static int expect_conflicts User option -- number of conflicts to expect | |
| final_time | back to summary |
|---|---|
| protected static long final_time Timing data -- when were we completely done | |
| first_end | back to summary |
|---|---|
| protected static long first_end Timing data -- when did we end first set calculation | |
| include_non_terms | back to summary |
|---|---|
| protected static boolean include_non_terms User option -- should we include non terminal symbol numbers in the symbol constant class. | |
| input_file | back to summary |
|---|---|
| protected static BufferedInputStream input_file Input file. This is a buffered version of System.in. | |
| lr_values | back to summary |
|---|---|
| protected static boolean lr_values User option -- should generator generate code for left/right values? | |
| machine_end | back to summary |
|---|---|
| protected static long machine_end Timing data -- when did we end state machine construction | |
| no_summary | back to summary |
|---|---|
| protected static boolean no_summary User option -- do not print a summary. | |
| nullability_end | back to summary |
|---|---|
| protected static long nullability_end Timing data -- when did we end nullability calculation | |
| opt_compact_red | back to summary |
|---|---|
| protected static boolean opt_compact_red User option -- do we compact tables by making most common reduce the default action | |
| opt_do_debug | back to summary |
|---|---|
| protected static boolean opt_do_debug User option -- do we run produce extra debugging messages | |
| opt_dump_grammar | back to summary |
|---|---|
| protected static boolean opt_dump_grammar User option -- do we produce a dump of the grammar | |
| opt_dump_states | back to summary |
|---|---|
| protected static boolean opt_dump_states User option -- do we produce a dump of the state machine | |
| opt_dump_tables | back to summary |
|---|---|
| protected static boolean opt_dump_tables User option -- do we produce a dump of the parse tables | |
| opt_show_timing | back to summary |
|---|---|
| protected static boolean opt_show_timing User option -- do we show timing information as a part of the summary | |
| parse_end | back to summary |
|---|---|
| protected static long parse_end Timing data -- when did we end parsing | |
| parser_class_file | back to summary |
|---|---|
| protected static PrintWriter parser_class_file Output file for the parser class. | |
| prelim_end | back to summary |
|---|---|
| protected static long prelim_end Timing data -- when did we end preliminaries | |
| print_progress | back to summary |
|---|---|
| protected static boolean print_progress User option -- do we print progress messages. | |
| reduce_check_end | back to summary |
|---|---|
| protected static long reduce_check_end Timing data -- when did we end checking for non-reduced productions | |
| reduce_table | back to summary |
|---|---|
| protected static parse_reduce_table reduce_table Resulting reduce-goto table. | |
| start_state | back to summary |
|---|---|
| protected static lalr_state start_state Start state in the overall state machine. | |
| start_time | back to summary |
|---|---|
| protected static long start_time Timing data -- when did we start | |
| suppress_scanner | back to summary |
|---|---|
| protected static boolean suppress_scanner User option -- should generator suppress references to java_cup.runtime.Scanner for compatibility with old runtimes? | |
| sym_interface | back to summary |
|---|---|
| protected static boolean sym_interface User option -- should symbols be put in a class or an interface? [CSA] | |
| symbol_class_file | back to summary |
|---|---|
| protected static PrintWriter symbol_class_file Output file for the symbol constant class. | |
| table_end | back to summary |
|---|---|
| protected static long table_end Timing data -- when did we end table construction | |
| Main | back to summary |
|---|---|
| private Main() Only constructor is private, so we do not allocate any instances of this class. | |
| build_parser | back to summary |
|---|---|
| protected static void build_parser() throws internal_error Build the (internal) parser from the previously parsed specification. This includes:
| |
| check_unused | back to summary |
|---|---|
| protected static void check_unused() Check for unused symbols. Unreduced productions get checked when tables are created. | |
| close_files | back to summary |
|---|---|
| protected static void close_files() throws IOException Close various files used by the system. | |
| dump_grammar | back to summary |
|---|---|
| public static void dump_grammar() throws internal_error Produce a human readable dump of the grammar. | |
| dump_machine | back to summary |
|---|---|
| public static void dump_machine() Produce a (semi-) human readable dump of the complete viable prefix recognition state machine. | |
| dump_tables | back to summary |
|---|---|
| public static void dump_tables() Produce a (semi-) human readable dumps of the parse tables | |
| emit_parser | back to summary |
|---|---|
| protected static void emit_parser() throws internal_error Call the emit routines necessary to write out the generated parser. | |
| emit_summary | back to summary |
|---|---|
| protected static void emit_summary(boolean output_produced) Emit a long summary message to standard error (System.err) which summarizes what was found in the specification, how many states were produced, how many conflicts were found, etc. A detailed timing summary is also produced if it was requested by the user.
| |
| main | back to summary |
|---|---|
| public static void main(String[] argv) throws internal_error, IOException, Exception The main driver for the system.
| |
| open_files | back to summary |
|---|---|
| protected static void open_files() Open various files used by the system. | |
| parse_args | back to summary |
|---|---|
| protected static void parse_args(String[] argv) Parse command line options and arguments to set various user-option flags and variables.
| |
| parse_grammar_spec | back to summary |
|---|---|
| protected static void parse_grammar_spec() throws Exception Parse the grammar specification from standard input. This produces sets of terminal, non-terminals, and productions which can be accessed via static variables of the respective classes, as well as the setting of various variables (mostly in the emit class) for small user supplied items such as the code to scan with. | |
| plural | back to summary |
|---|---|
| protected static String plural(int val) Helper routine to optionally return a plural or non-plural ending.
| |
| show_times | back to summary |
|---|---|
| protected static void show_times() Produce the optional timing summary as part of an overall summary. | |
| timestr | back to summary |
|---|---|
| protected static String timestr(long time_val, long total_time) Helper routine to format a decimal based display of seconds and percentage of total time given counts of milliseconds. Note this is broken for use with some instances of negative time (since we don't use any negative time here, we let if be for now).
| |
| usage | back to summary |
|---|---|
| protected static void usage(String message) Print a "usage message" that described possible command line options, then exit.
| |