Schcmp{ traversal printClass(DisplayVisitor dV) { to *; } void print_temp() (@ PrintWriter w = new PrintWriter(System.out, true); this.printClass(new DisplayVisitor(w)); w.flush(); @) } Main { (@ public static void main(String[] argv) throws Exception { try { File schema1 = new File(argv[0]); if (!schema1.exists()) { System.err.println("Could not find "+argv[0]); throw new FileNotFoundException(); } File schema2 = new File(argv[1]); if (!schema2.exists()) { System.err.println("Could not find "+argv[1]); throw new FileNotFoundException(); } Schcmp schemaA = Schcmp.parse(new FileInputStream(schema1)); Schcmp schemaB = Schcmp.parse(new FileInputStream(schema2)); //printout the Schema of both A and B schemaA.print_temp(); schemaB.print_temp(); } catch (ParseError e) { System.err.println("Failed to parse file."); e.printStackTrace(); System.exit(1); } catch (FileNotFoundException e) { System.err.println("\nPlease check and see if the file name exists. "); System.exit(1); } } @) }