todo toLLVM
This commit is contained in:
@@ -47,16 +47,16 @@ public class Main {
|
||||
// Pretty-print the program (to debug parsing)
|
||||
System.err.println("todo " + ast);
|
||||
|
||||
//System.out.println("\n\n PRETTYPRINTER : \n--------------\n" + ast.prettyprinter() + "\n--------------\nFIN PRETTYPRINTER");
|
||||
System.out.println("\n\n PRETTYPRINTER : \n--------------\n" + ast.prettyprinter() + "\n--------------\nFIN PRETTYPRINTER");
|
||||
|
||||
// Verify the program semantic
|
||||
|
||||
// Generate the intermediate representation
|
||||
System.out.println("todo");
|
||||
|
||||
ProgramLLVMImpl astLLVM = ast.toLLVM();
|
||||
//ProgramLLVMImpl astLLVM = ast.toLLVM();
|
||||
|
||||
System.out.println("\n\n PRETTYPRINTER : \n--------------\n" + astLLVM.prettyprinter() + "\n--------------\nFIN PRETTYPRINTER");
|
||||
//System.out.println("\n\n PRETTYPRINTER : \n--------------\n" + astLLVM.prettyprinter() + "\n--------------\nFIN PRETTYPRINTER");
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -45,6 +45,7 @@ public interface Interface{
|
||||
public interface Expression {
|
||||
public <H,S> S accept(ExprVisitor<H,S> v, H h);
|
||||
public String prettyprinter();
|
||||
public DefineLLVM toLLVM();
|
||||
}
|
||||
|
||||
public interface ExprVisitor<H,S> {
|
||||
|
||||
@@ -73,6 +73,12 @@ public class Program{
|
||||
public String prettyprinter(){
|
||||
return c+"";
|
||||
}
|
||||
|
||||
@Override
|
||||
public DefineLLVM toLLVM() {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'toLLVM'");
|
||||
}
|
||||
}
|
||||
|
||||
public static record BinopExpressionImp(Op op,Expression e1, Expression e2) implements Expression{
|
||||
@@ -92,6 +98,12 @@ public class Program{
|
||||
}
|
||||
return "(" + e1.prettyprinter() +" "+ opStr +" " + e2.prettyprinter() + ")";
|
||||
}
|
||||
|
||||
@Override
|
||||
public DefineLLVM toLLVM() {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'toLLVM'");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user