public class PrettyPrintVisitor extends java.lang.Object implements AstVisitor<java.lang.Void>
Modifier and Type | Class and Description |
---|---|
class |
PrettyPrintVisitor.PrettyPrintExpr |
Modifier and Type | Field and Description |
---|---|
(package private) ExprVisitorAdapter<java.lang.Void> |
eva |
(package private) int |
indent |
private java.lang.String |
main |
(package private) PrettyPrintVisitor.PrettyPrintExpr |
ppe |
private java.lang.StringBuilder |
sb |
Modifier | Constructor and Description |
---|---|
protected |
PrettyPrintVisitor() |
Modifier and Type | Method and Description |
---|---|
protected void |
ind() |
protected void |
indent() |
protected void |
nl() |
static java.lang.String |
print(Ast s) |
static java.lang.String |
print(za.ac.sun.cs.green.expr.Expression s) |
java.lang.String |
toString() |
protected void |
unindent() |
java.lang.Void |
visit(ArrayLengthInstruction c) |
java.lang.Void |
visit(ArrayLoadInstruction c) |
java.lang.Void |
visit(ArrayStoreInstruction c) |
java.lang.Void |
visit(AssignmentStmt a) |
java.lang.Void |
visit(CheckCastInstruction c) |
java.lang.Void |
visit(CompositionStmt a) |
java.lang.Void |
visit(GetInstruction c) |
java.lang.Void |
visit(IfThenElseStmt a) |
java.lang.Void |
visit(InstanceOfInstruction c) |
java.lang.Void |
visit(InvokeInstruction c) |
java.lang.Void |
visit(NewInstruction c) |
java.lang.Void |
visit(PhiInstruction c) |
java.lang.Void |
visit(PutInstruction c) |
java.lang.Void |
visit(ReturnInstruction c) |
java.lang.Void |
visit(SkipStmt a) |
java.lang.Void |
visit(SPFCaseStmt c) |
java.lang.Void |
visit(SwitchInstruction c) |
java.lang.Void |
visit(ThrowInstruction c) |
protected void |
write(za.ac.sun.cs.green.expr.Expression e) |
protected void |
write(Stmt a) |
protected void |
write(java.lang.String s) |
int indent
private java.lang.StringBuilder sb
private java.lang.String main
ExprVisitorAdapter<java.lang.Void> eva
protected void ind()
protected void indent()
protected void unindent()
protected void nl()
protected void write(Stmt a)
protected void write(java.lang.String s)
protected void write(za.ac.sun.cs.green.expr.Expression e)
public java.lang.Void visit(AssignmentStmt a)
visit
in interface AstVisitor<java.lang.Void>
public java.lang.Void visit(CompositionStmt a)
visit
in interface AstVisitor<java.lang.Void>
public java.lang.Void visit(IfThenElseStmt a)
visit
in interface AstVisitor<java.lang.Void>
public java.lang.Void visit(SkipStmt a)
visit
in interface AstVisitor<java.lang.Void>
public java.lang.Void visit(SPFCaseStmt c)
visit
in interface AstVisitor<java.lang.Void>
public java.lang.Void visit(ArrayLoadInstruction c)
visit
in interface AstVisitor<java.lang.Void>
public java.lang.Void visit(ArrayStoreInstruction c)
visit
in interface AstVisitor<java.lang.Void>
public java.lang.Void visit(SwitchInstruction c)
visit
in interface AstVisitor<java.lang.Void>
public java.lang.Void visit(ReturnInstruction c)
visit
in interface AstVisitor<java.lang.Void>
public java.lang.Void visit(GetInstruction c)
visit
in interface AstVisitor<java.lang.Void>
public java.lang.Void visit(PutInstruction c)
visit
in interface AstVisitor<java.lang.Void>
public java.lang.Void visit(NewInstruction c)
visit
in interface AstVisitor<java.lang.Void>
public java.lang.Void visit(InvokeInstruction c)
visit
in interface AstVisitor<java.lang.Void>
public java.lang.Void visit(ArrayLengthInstruction c)
visit
in interface AstVisitor<java.lang.Void>
public java.lang.Void visit(ThrowInstruction c)
visit
in interface AstVisitor<java.lang.Void>
public java.lang.Void visit(CheckCastInstruction c)
visit
in interface AstVisitor<java.lang.Void>
public java.lang.Void visit(InstanceOfInstruction c)
visit
in interface AstVisitor<java.lang.Void>
public java.lang.Void visit(PhiInstruction c)
visit
in interface AstVisitor<java.lang.Void>
public java.lang.String toString()
toString
in class java.lang.Object
public static java.lang.String print(Ast s)
public static java.lang.String print(za.ac.sun.cs.green.expr.Expression s)