test pass
This commit is contained in:
@@ -81,9 +81,9 @@ instruction returns [Instruction out]:
|
|||||||
$out =new Return_instrImp($e.out);}
|
$out =new Return_instrImp($e.out);}
|
||||||
| //BLOC
|
| //BLOC
|
||||||
BacO
|
BacO
|
||||||
(dec=list_decls instr4=list_instr
|
(dec=list_decls ins2=list_instr
|
||||||
{
|
{
|
||||||
$out=new BlocDecImp($dec.out,$insts4.out);
|
$out=new BlocDecImp($dec.out,$ins2.out);
|
||||||
}
|
}
|
||||||
| instr3=list_instr
|
| instr3=list_instr
|
||||||
{ $out= new BlocImp($instr3.out);
|
{ $out= new BlocImp($instr3.out);
|
||||||
|
|||||||
@@ -32,9 +32,9 @@ public interface Interface {
|
|||||||
public S visitStoreLLVM(StoreLLVMImpl instr, H h);
|
public S visitStoreLLVM(StoreLLVMImpl instr, H h);
|
||||||
public S visitPrintLLVM(PrintLLVMImpl instr, H h);
|
public S visitPrintLLVM(PrintLLVMImpl instr, H h);
|
||||||
public S visitReadLLVM(ReadLLVMImpl instr, H h);
|
public S visitReadLLVM(ReadLLVMImpl instr, H h);
|
||||||
public S visitIfThenElseLLVM(IfThenElseImp instr, H h);
|
public S visitIfThenElseLLVM(IfThenElseLLVMImp instr, H h);
|
||||||
//public S visitIfThenLLVM(IfThenImp instr, H h); TODO
|
public S visitIfThenLLVM(IfThenLLVMImp instr, H h);
|
||||||
//public S visitWhileLLVM(WhileImp instr, H h);
|
public S visitWhileLLVM(WhileLLVMImp instr, H h);
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////ExpressionLLVM (expression)
|
//////////ExpressionLLVM (expression)
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package TP2.llvm;
|
package TP2.llvm;
|
||||||
|
|
||||||
|
import TP2.asd.Program.IfThenElseImp;
|
||||||
import TP2.llvm.Interface.*;
|
import TP2.llvm.Interface.*;
|
||||||
import TP2.llvm.ProgramLLVM.*;
|
import TP2.llvm.ProgramLLVM.*;
|
||||||
|
|
||||||
@@ -112,6 +113,25 @@ TypeLLVMVisitor<String,String>
|
|||||||
return INDENT+"call " + "...TODO..." +" scanf " + "...TODO...";
|
return INDENT+"call " + "...TODO..." +" scanf " + "...TODO...";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String visitIfThenElseLLVM(IfThenElseLLVMImp instr, String h) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
throw new UnsupportedOperationException("Unimplemented method 'visitIfThenElseLLVM'");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String visitIfThenLLVM(IfThenLLVMImp instr, String h) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
throw new UnsupportedOperationException("Unimplemented method 'visitIfThenLLVM'");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String visitWhileLLVM(WhileLLVMImp instr, String h) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
throw new UnsupportedOperationException("Unimplemented method 'visitWhileLLVM'");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String visitValLLVM(ValLLVMImpl e, String h) {
|
public String visitValLLVM(ValLLVMImpl e, String h) {
|
||||||
return e.val() + "";
|
return e.val() + "";
|
||||||
@@ -131,7 +151,4 @@ TypeLLVMVisitor<String,String>
|
|||||||
public String visitVoidLLVM(VoidLLVMImpl e, String h) {
|
public String visitVoidLLVM(VoidLLVMImpl e, String h) {
|
||||||
return "void";
|
return "void";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user