debug("Using ClassLoaded to read \""+filename+"\".");
debug("Using ClassLoader to read \""+filename+"\".");
  void processFile(String filename) {    InputStream stream = null;    try {      targetdir = new File(System.getProperty("user.dir"));      if (filename.equals("-")) {        debug("Reading from standard input.");        stream = new java.io.DataInputStream(System.in);      } else if (new File(filename).exists()) {        debug("Reading \""+filename+"\".");        stream = new FileInputStream(filename);        int p;        if ((p=filename.lastIndexOf(File.separatorChar))!=-1) {          targetdir = new File(filename.substring(0,p));        }      } else {        debug("Using ClassLoaded to read \""+filename+"\".");        stream =           getClass().getClassLoader().getResourceAsStream(filename);      }      PGParser p = new PGParser(isVerbose);      p.parse(stream);      stream.close();            Writer w = new Writer(p);      w.write();      w.done();    } catch (Exception e) {      System.err.println("Caught: "+e);      e.printStackTrace();    }  }