parser = null; System.gc(); System.runFinalization();
if (debugCacheStats) { parser = null; System.gc(); System.runFinalization(); }
  public static void main(String[] args) {    if (!processArgs(args))      return;    Parser parser = null;    if (inputFilename != null) {      try {        File inFile = new File(inputFilename);        if (!inFile.exists()) {          System.err.println(className + ": error: file \"" + inputFilename +                             "\" does not exist");          return;        }        parser = new Parser(derivedDataFilename);        int bufSize = Constants.defaultFileBufsize;        OutputStreamWriter osw =          new OutputStreamWriter(new FileOutputStream(outputFilename),                                 Language.encoding());        BufferedWriter out = new BufferedWriter(osw, bufSize);        Sexp sent = null;        SexpTokenizer tok =          new SexpTokenizer(inputFilename, Language.encoding(),                            Constants.defaultFileBufsize);        Time totalTime = new Time();        Time time = new Time();        for (int i = 1; ((sent = Sexp.read(tok)) != null); i++) {          System.err.println("processing sentence No. " + i + ": " + sent);          time.reset();          Sexp parsedSent = parser.parse(sent.list());          System.err.println("elapsed time: " + time);          out.write(String.valueOf(parsedSent));          out.write("\n");        }        System.err.println("\ntotal elapsed time: " + totalTime);        System.err.println("\nHave a nice day!");        out.flush();      }      catch (RemoteException re) {        System.err.println(re);      }      catch (IOException ioe) {        System.err.println(ioe);      }      catch (ClassNotFoundException cnfe) {        System.err.println(cnfe);      }    }    else {      // create and install a security manager      if (System.getSecurityManager() == null)        System.setSecurityManager(new RMISecurityManager());      // define fallback-default values for the following three      // fault-tolerance settings      int defaultRetries = 1, defaultRetrySleep = 1000;      boolean defaultFailover = true;      try {        DecoderServer server = null;        if (derivedDataFilename != null)          server = new DecoderServer(derivedDataFilename);        for (int i = 0; i < numClients; i++) {          try {            parser = new Parser(Parser.getTimeout());            parser.register(switchboardName);            Properties sbSettings = parser.switchboard.getSettings();            if (derivedDataFilename != null)              checkSettings(sbSettings);            Settings.setSettings(sbSettings);            if (derivedDataFilename != null) {              parser.server = server;              parser.localServer = true;            }            else              parser.getFaultTolerantServer(getRetries(defaultRetries),                                            getRetrySleep(defaultRetrySleep),                                            getFailover(defaultFailover));            new Thread(parser, "Parse Client " + parser.id).start();          }          catch (RemoteException re) {            System.err.println(re);            if (parser != null) {      	    try { parser.die(true); }              catch (RemoteException re2) {                System.err.println("client " + parser.id +                                   " couldn't die! (" + re + ")");              }            }          }        }      }      catch (MalformedURLException mue) {        System.err.println(mue);      }      catch (IOException ioe) {        System.err.println(ioe);      }      catch (ClassNotFoundException cnfe) {        System.err.println(cnfe);      }    }    if (debug)      System.err.println(className + ": main ending!");    parser = null;    System.gc();    System.runFinalization();  }