Comment out syso's that print something that's not assembly code
This commit is contained in:
@@ -26,16 +26,16 @@ public class Klang {
|
|||||||
ContextAnalysis ctxAnal = new ContextAnalysis();
|
ContextAnalysis ctxAnal = new ContextAnalysis();
|
||||||
Node node = ctxAnal.visit(tree); // this gets us the DAST
|
Node node = ctxAnal.visit(tree); // this gets us the DAST
|
||||||
|
|
||||||
// Pretty Print the sourcecode
|
// // Pretty Print the sourcecode
|
||||||
System.out.println("\nPrinting the sourcecode:");
|
// System.out.println("\nPrinting the sourcecode:");
|
||||||
StringWriter w = new StringWriter();
|
// StringWriter w = new StringWriter();
|
||||||
PrettyPrintVisitor.ExWriter ex = new PrettyPrintVisitor.ExWriter(w);
|
// PrettyPrintVisitor.ExWriter ex = new PrettyPrintVisitor.ExWriter(w);
|
||||||
PrettyPrintVisitor printVisitor = new PrettyPrintVisitor(ex);
|
// PrettyPrintVisitor printVisitor = new PrettyPrintVisitor(ex);
|
||||||
node.welcome(printVisitor);
|
// node.welcome(printVisitor);
|
||||||
System.out.println(w.toString());
|
// System.out.println(w.toString());
|
||||||
|
|
||||||
// Generate assembler code
|
// Generate assembler code
|
||||||
System.out.println("\nPrinting the assembler code");
|
// System.out.println("\nPrinting the assembler code");
|
||||||
StringWriter wAsm = new StringWriter();
|
StringWriter wAsm = new StringWriter();
|
||||||
GenASM.ExWriter exAsm = new GenASM.ExWriter(wAsm);
|
GenASM.ExWriter exAsm = new GenASM.ExWriter(wAsm);
|
||||||
GenASM genasm = new GenASM(exAsm);
|
GenASM genasm = new GenASM(exAsm);
|
||||||
@@ -43,13 +43,13 @@ public class Klang {
|
|||||||
System.out.println(wAsm.toString());
|
System.out.println(wAsm.toString());
|
||||||
|
|
||||||
// Evaluate the sourcecode and print the result
|
// Evaluate the sourcecode and print the result
|
||||||
System.out.println("\nEvaluating the source code:");
|
// System.out.println("\nEvaluating the source code:");
|
||||||
EvalVisitor evalVisitor = new EvalVisitor();
|
// EvalVisitor evalVisitor = new EvalVisitor();
|
||||||
Value result = node.welcome(evalVisitor);
|
// Value result = node.welcome(evalVisitor);
|
||||||
if (result != null) {
|
// if (result != null) {
|
||||||
System.out.println("result: " + result.asInteger());
|
// System.out.println("result: " + result.asInteger());
|
||||||
} else {
|
// } else {
|
||||||
System.out.println("result was null");
|
// System.out.println("result was null");
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user