output the generated assembler code
This commit is contained in:
@@ -34,6 +34,14 @@ public class Klang {
|
|||||||
node.welcome(printVisitor);
|
node.welcome(printVisitor);
|
||||||
System.out.println(w.toString());
|
System.out.println(w.toString());
|
||||||
|
|
||||||
|
// Generate assembler code
|
||||||
|
System.out.println("\nPrinting the assembler code");
|
||||||
|
StringWriter wAsm = new StringWriter();
|
||||||
|
GenASM.ExWriter exAsm = new GenASM.ExWriter(wAsm);
|
||||||
|
GenASM genasm = new GenASM(exAsm);
|
||||||
|
node.welcome(genasm);
|
||||||
|
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();
|
||||||
|
|||||||
Reference in New Issue
Block a user