public class Main extends Object
| Modifier and Type | Field and Description | 
|---|---|
| protected static parse_action_table | action_tableResulting parse action table. | 
| protected static long | build_endTiming data -- when did we end state and table building | 
| protected static long | check_endTiming data -- when did we end checking | 
| protected static File | dest_dirOutput directory. | 
| protected static long | dump_endTiming data -- when did we end dumping | 
| protected static long | emit_endTiming data -- when did we finish emitting code | 
| protected static int | expect_conflictsUser option -- number of conflicts to expect | 
| protected static long | final_timeTiming data -- when were we completely done | 
| protected static long | first_endTiming data -- when did we end first set calculation | 
| protected static boolean | include_non_termsUser option -- should we include non terminal symbol numbers in the 
      symbol constant class. | 
| protected static BufferedInputStream | input_fileInput file. | 
| protected static boolean | lr_valuesUser option -- should generator generate code for left/right values? | 
| protected static long | machine_endTiming data -- when did we end state machine construction | 
| protected static boolean | no_summaryUser option -- do not print a summary. | 
| protected static long | nullability_endTiming data -- when did we end nullability calculation | 
| protected static boolean | opt_compact_redUser option -- do we compact tables by making most common reduce the 
      default action | 
| protected static boolean | opt_do_debugUser option -- do we run produce extra debugging messages | 
| protected static boolean | opt_dump_grammarUser option -- do we produce a dump of the grammar | 
| protected static boolean | opt_dump_statesUser option -- do we produce a dump of the state machine | 
| protected static boolean | opt_dump_tablesUser option -- do we produce a dump of the parse tables | 
| protected static boolean | opt_show_timingUser option -- do we show timing information as a part of the summary | 
| protected static long | parse_endTiming data -- when did we end parsing | 
| protected static PrintWriter | parser_class_fileOutput file for the parser class. | 
| protected static long | prelim_endTiming data -- when did we end preliminaries | 
| protected static boolean | print_progressUser option -- do we print progress messages. | 
| protected static long | reduce_check_endTiming data -- when did we end checking for non-reduced productions | 
| protected static parse_reduce_table | reduce_tableResulting reduce-goto table. | 
| protected static lalr_state | start_stateStart state in the overall state machine. | 
| protected static long | start_timeTiming data -- when did we start | 
| protected static boolean | suppress_scannerUser option -- should generator suppress references to
  java_cup.runtime.Scanner for compatibility with old runtimes? | 
| protected static boolean | sym_interfaceUser option -- should symbols be put in a class or an interface? [CSA] | 
| protected static PrintWriter | symbol_class_fileOutput file for the symbol constant class. | 
| protected static long | table_endTiming data -- when did we end table construction | 
| Modifier and Type | Method and Description | 
|---|---|
| protected static void | build_parser()Build the (internal) parser from the previously parsed specification. | 
| protected static void | check_unused()Check for unused symbols. | 
| protected static void | close_files()Close various files used by the system. | 
| static void | dump_grammar()Produce a human readable dump of the grammar. | 
| static void | dump_machine()Produce a (semi-) human readable dump of the complete viable prefix 
  recognition state machine. | 
| static void | dump_tables()Produce a (semi-) human readable dumps of the parse tables | 
| protected static void | emit_parser()Call the emit routines necessary to write out the generated parser. | 
| 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. | 
| static void | main(String[] argv)The main driver for the system. | 
| protected static void | open_files()Open various files used by the system. | 
| protected static void | parse_args(String[] argv)Parse command line options and arguments to set various user-option
  flags and variables. | 
| protected static void | parse_grammar_spec()Parse the grammar specification from standard input. | 
| protected static String | plural(int val)Helper routine to optionally return a plural or non-plural ending. | 
| protected static void | show_times()Produce the optional timing summary as part of an overall 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. | 
| protected static void | usage(String message)Print a "usage message" that described possible command line options, 
  then exit. | 
protected static boolean print_progress
protected static boolean opt_dump_states
protected static boolean opt_dump_tables
protected static boolean opt_dump_grammar
protected static boolean opt_show_timing
protected static boolean opt_do_debug
protected static boolean opt_compact_red
protected static boolean include_non_terms
protected static boolean no_summary
protected static int expect_conflicts
protected static boolean lr_values
protected static boolean sym_interface
protected static boolean suppress_scanner
protected static long start_time
protected static long prelim_end
protected static long parse_end
protected static long check_end
protected static long dump_end
protected static long build_end
protected static long nullability_end
protected static long first_end
protected static long machine_end
protected static long table_end
protected static long reduce_check_end
protected static long emit_end
protected static long final_time
protected static BufferedInputStream input_file
protected static PrintWriter parser_class_file
protected static PrintWriter symbol_class_file
protected static File dest_dir
protected static lalr_state start_state
protected static parse_action_table action_table
protected static parse_reduce_table reduce_table
public static void main(String[] argv) throws internal_error, IOException, Exception
argv - an array of strings containing command line arguments.internal_errorIOExceptionExceptionprotected static void usage(String message)
message - a specific error message to preface the usage message by.protected static void parse_args(String[] argv)
argv - the command line arguments to be parsed.protected static void open_files()
protected static void close_files()
                           throws IOException
IOExceptionprotected static void parse_grammar_spec()
                                  throws Exception
Exceptionprotected static void check_unused()
protected static void build_parser()
                            throws internal_error
internal_errorprotected static void emit_parser()
                           throws internal_error
internal_errorprotected static String plural(int val)
val - the numerical value determining plurality.protected static void emit_summary(boolean output_produced)
output_produced - did the system get far enough to generate code.protected static void show_times()
protected static String timestr(long time_val, long total_time)
time_val - the value being formatted (in ms).total_time - total time percentages are calculated against (in ms).public static void dump_grammar()
                         throws internal_error
internal_errorpublic static void dump_machine()
public static void dump_tables()
Copyright © 2003–2016 Community Z Tools Project. All rights reserved.