todo declaration c pt
This commit is contained in:
@@ -4,7 +4,7 @@ import TP2.asd.Program.*;
|
||||
import TP2.llvm.ProgramLLVM.*;
|
||||
|
||||
public interface Interface{
|
||||
//////////Program
|
||||
//PROGRAM
|
||||
public interface ProgramI {
|
||||
public <H,S> S accept(ProgramVisitor<H,S> v, H h);
|
||||
public String prettyprinter();
|
||||
@@ -16,7 +16,7 @@ public interface Interface{
|
||||
}
|
||||
|
||||
|
||||
//////////Function
|
||||
//FUNCTION
|
||||
public interface Function {
|
||||
public <H,S> S accept(FunctionVisitor<H,S> v, H h);
|
||||
}
|
||||
@@ -25,16 +25,26 @@ public interface Interface{
|
||||
public S visitFunction(FunctionImp fun, H h);
|
||||
}
|
||||
|
||||
//DECLARATION
|
||||
|
||||
public interface Declaration{
|
||||
public <H,S> S accept(DeclVisitor<H,S> v, H h);
|
||||
}
|
||||
|
||||
public interface DeclVisitor<H,S>{
|
||||
public S visitDeclaration(DeclarationImp instr,H h);
|
||||
}
|
||||
|
||||
//INSTRUCTION
|
||||
|
||||
//////////Instruction
|
||||
public interface Instruction {
|
||||
public <H,S> S accept(InstrVisitor<H,S> v, H h);
|
||||
}
|
||||
|
||||
|
||||
public interface InstrVisitor<H,S>{
|
||||
public S visitReturn(Return_instrImp instr, H h);
|
||||
public S visitAssign(AssignImp instr, H h);
|
||||
public S visitDeclaration(DeclarationImp instr,H h);
|
||||
public S visitPrint(PrintImp instr, H h);
|
||||
public S visitRead(ReadImp instr,H h);
|
||||
public S visitIfThen(IfThenImp instr, H h);
|
||||
@@ -43,7 +53,7 @@ public interface Interface{
|
||||
}
|
||||
|
||||
|
||||
//////////Expression
|
||||
//EXPRESSION
|
||||
//We put prettyprinter here beause each expr will have to implement it like accept visitor
|
||||
//but each implement will be different for prettyprinter
|
||||
public interface Expression {
|
||||
|
||||
Reference in New Issue
Block a user