From: bdemsky Date: Mon, 22 Nov 2010 22:06:39 +0000 (+0000) Subject: just a little hack after reading the output of the compiler... X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=4492205a93a21f3f30abb72c34d083a9e143bb9d;p=IRC.git just a little hack after reading the output of the compiler... --- diff --git a/Robust/src/Util/CodePrinter.java b/Robust/src/Util/CodePrinter.java new file mode 100644 index 00000000..046589b7 --- /dev/null +++ b/Robust/src/Util/CodePrinter.java @@ -0,0 +1,155 @@ +package Util; +import java.io.PrintWriter; +import java.io.Writer; +import java.io.OutputStream; + +public class CodePrinter extends PrintWriter { + int braceCount=0; + StringBuffer sb=new StringBuffer(); + public CodePrinter(Writer w) { + super(w); + } + + public CodePrinter(Writer w, boolean af) { + super(w,af); + } + + public CodePrinter(OutputStream w) { + super(w); + } + + public CodePrinter(OutputStream w, boolean af) { + super(w,af); + } + + StringBuffer genSpacing() { + StringBuffer sb=new StringBuffer(); + for(int i=0;i