public static void main(String argv[]) {
    if (argv.length == 0) {
      System.out.println("Usage : java EUGScanner <inputfile>");
    }
    else {
      for (int i = 0; i < argv.length; i++) {
        EUGScanner scanner = null;
        try {
          scanner = new EUGScanner( new java.io.FileReader(argv[i]) );
          while ( !scanner.zzAtEOF ) scanner.next();
        }
        catch (java.io.FileNotFoundException e) {
          System.out.println("File not found : \""+argv[i]+"\"");
        }
        catch (java.io.IOException e) {
          System.out.println("IO error scanning file \""+argv[i]+"\"");
          System.out.println(e);
        }
        catch (Exception e) {
          System.out.println("Unexpected exception:");
          e.printStackTrace();
        }
      }
    }
  }