import ast.*;

public class PrettyPrinter{
	public static String visit(Exp e){
		switch(e.getClass().getSimpleName()) {
			case "Add":
				return "("+ visit(((Bin)e).getLeft()) +" + "+ visit(((Bin)e).getRight())+")";
			case "Sub":
				return "("+ visit(((Bin)e).getLeft()) +" - "+ visit(((Bin)e).getRight())+")";
			case "Div":
				return "("+ visit(((Bin)e).getLeft()) +" / "+ visit(((Bin)e).getRight())+")";
			case "Mul":
				return "("+ visit(((Bin)e).getLeft()) +" * "+ visit(((Bin)e).getRight())+")";
			case "Num":
				return ""+((Num)e).getValue();
			case "Plus":
				return visit(((Unary)e).getFactor());
			case "Minus":
				return "-" + visit(((Unary)e).getFactor());
		}
		return e.getClass().getSimpleName();
	}
}

@@ -674,16 +674,543 @@
 tor());%0A
+%09%09%09case %22Eq%22:%0A%09%09%09%09return visit(((Bin)e).getLeft()) +%22 = %22+ visit(((Bin)e).getRight());%0A%09%09%09case %22Ne%22:%0A%09%09%09%09return visit(((Bin)e).getLeft()) +%22 %3C%3E %22+ visit(((Bin)e).getRight());%0A%09%09%09case %22Le%22:%0A%09%09%09%09return visit(((Bin)e).getLeft()) +%22 %3C= %22+ visit(((Bin)e).getRight());%0A%09%09%09case %22Lt%22:%0A%09%09%09%09return visit(((Bin)e).getLeft()) +%22 %3C %22 + visit(((Bin)e).getRight());%0A%09%09%09case %22Ge%22:%0A%09%09%09%09return visit(((Bin)e).getLeft()) +%22 %3E %22 + visit(((Bin)e).getRight());%0A%09%09%09case %22Gt%22:%0A%09%09%09%09return visit(((Bin)e).getLeft()) +%22 %3E %22 + visit(((Bin)e).getRight());%0A
 %09%09%7D%0A%09%09re

Add PrettyPrint for comp operators