runtime.error(file.toString() + ": " + x.getMessage());
}
return;
}
printHeader(out);
new JavaPrinter(out).dispatch(result_ast);
out.flush();
}
// Write the xxxTypes.java
file = new File(dir, output + "Types.java" );
try {
out = new
Printer(new PrintWriter(new BufferedWriter(new FileWriter(file))));
} catch (IOException x) {
if (null == x.getMessage()) {
runtime.error(file.toString() + ": I/O error");
} else {
runtime.error(file.toString() + ": " + x.getMessage());
}
return;
}
printHeader(out);
new JavaPrinter(out).dispatch(types_ast);
out.flush();
// Write the xxxSupport.java
file = new File(dir, output + "Support.java" );
try {
out = new
Printer(new PrintWriter(new BufferedWriter(new FileWriter(file))));
} catch (IOException x) {
if (null == x.getMessage()) {
runtime.error(file.toString() + ": I/O error");
} else {
runtime.error(file.toString() + ": " + x.getMessage());
}
return;
}
printHeader(out);
new JavaPrinter(out).dispatch(support_ast);
out.flush();
}
if (runtime.test("printSource")) {
new JavaPrinter(runtime.console()).dispatch(result_ast);
runtime.console().flush();
}
}