} else if (args[1].equals("--vboutput")) { writeVisualBasicCode(args, grammar);
    public static void main(String[] args) {        Grammar  grammar = null;        // Parse command-line arguments        if (args.length == 1 && args[0].equals("--help")) {            printHelp(null);            System.exit(1);        }        if (args.length < 2) {            printHelp("Missing grammar file and/or action");            System.exit(1);        }        // Read grammar file        try {            grammar = new Grammar(new File(args[0]));        } catch (FileNotFoundException e) {            printError(args[0], e);            System.exit(1);        } catch (ParserLogException e) {            printError(args[0], e);            System.exit(1);        } catch (GrammarException e) {            printError(e);            System.exit(1);        } catch (SecurityException e) {            throw e;        } catch (RuntimeException e) {            printInternalError(e);            System.exit(2);        }        // Check action parameter        try {            if (args[1].equals("--debug")) {                debug(grammar);            } else if (args.length < 3) {                printHelp("missing action file parameter");                System.exit(1);            } else if (args[1].equals("--tokenize")) {                tokenize(grammar, new File(args[2]));            } else if (args[1].equals("--parse")) {                parse(grammar, new File(args[2]));            } else if (args[1].equals("--profile")) {                profile(grammar, new File(args[2]));            } else if (args[1].equals("--javaoutput")) {                writeJavaCode(args, grammar);            } else if (args[1].equals("--csoutput")) {                writeCSharpCode(args, grammar);            } else {                printHelp("unrecognized option: " + args[1]);                System.exit(1);            }        } catch (SecurityException e) {            throw e;        } catch (RuntimeException e) {            printInternalError(e);            System.exit(2);        }    }