Main { // from demjava (@ private static File output; static PrintWriter out; static public void main(String args[]) throws Exception { ObjectGraph comp = ObjectGraph.parse(System.in); comp.show(); // File gendir = new File("gen2"); // File xcdfile = new File(gendir, "produced"); // openOutputFile(xcdfile); // comp.toAll(new PrintVisitor(out)); // closeOutputFile(); // InputStream in = makeInputStream(xcdfile); // prog = ObjectGraph.parse(in); System.out.println("done "); } @) // from demjava /** Open the file, setting Program.out to the stream. */ //static void openOutputFile() (@ //file = new File("produced"); //try { //ck = new /* CRC32 */ Adler32(); //out = new PrintWriter //(new CheckedOutputStream(new FileOutputStream(file), ck)); //} catch (IOException e) { //throw new RuntimeException(e.toString()); //} //@) /** Close and flush the current output file. If the file hasn't changed, move the old one back so the timestamp doesn't change. */ //static void closeOutputFile() (@ //out.flush(); //out.close(); //@) } ObjectGraph { void show() to * (DisplayVisitor); traversal toAll(UniversalVisitor) { to *;} }