java_cup
Class Main

java.lang.Object
  extended by java_cup.Main

public class Main
extends java.lang.Object

This class serves as the main driver for the JavaCup system. It accepts user options and coordinates overall control flow. The main flow of control includes the following activities:

Options to the main program include:
-package name
specify package generated classes go in [default none]
-parser name
specify parser class name [default "parser"]
-symbols name
specify name for symbol constant class [default "sym"]
-interface
emit symbol constant interface, rather than class
-nonterms
put non terminals in symbol constant class
-expect #
number of conflicts expected/allowed [default 0]
-compact_red
compact tables by defaulting to most frequent reduce
-nowarn
don't warn about useless productions, etc.
-nosummary
don't print the usual summary of parse states, etc.
-progress
print messages to indicate progress of the system
-time
print time usage summary
-dump_grammar
produce a dump of the symbols and grammar
-dump_states
produce a dump of parse state machine
-dump_tables
produce a dump of the parse tables
-dump
produce a dump of all of the above
-debug
turn on debugging messages within JavaCup
-nopositions
don't generate the positions code
-noscanner
don't refer to java_cup.runtime.Scanner in the parser (for compatibility with old runtimes)
-version
print version information for JavaCUP and halt.

Version:
last updated: 7/3/96
Author:
Frank Flannery

Method Summary
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
static void main(java.lang.String[] argv)
          The main driver for the system.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

main

public static void main(java.lang.String[] argv)
                 throws internal_error,
                        java.io.IOException,
                        java.lang.Exception
The main driver for the system.

Parameters:
argv - an array of strings containing command line arguments.
Throws:
internal_error
java.io.IOException
java.lang.Exception

dump_grammar

public static void dump_grammar()
                         throws internal_error
Produce a human readable dump of the grammar.

Throws:
internal_error

dump_machine

public static void dump_machine()
Produce a (semi-) human readable dump of the complete viable prefix recognition state machine.


dump_tables

public static void dump_tables()
Produce a (semi-) human readable dumps of the parse tables