diff --git a/src/main/java/TP2/llvm/Interface.java b/src/main/java/TP2/llvm/Interface.java index 72e0662..3dff36b 100644 --- a/src/main/java/TP2/llvm/Interface.java +++ b/src/main/java/TP2/llvm/Interface.java @@ -1,44 +1,58 @@ package TP2.llvm; +import TP2.asd.Program.AssignImp; +import TP2.asd.Program.BinopExpressionImp; +import TP2.asd.Program.ConstImp; import TP2.asd.Program.ProgramImp; +import TP2.asd.Program.Return_instrImp; import TP2.llvm.ProgramLLVM.*; public interface Interface { - //////////ProgramLLVM + //////////ProgramLLVM (Program) public interface ProgLLVM{ public S accept(ProgramLLVMVisitor v, H h); public String prettyprinter(); } public interface ProgramLLVMVisitor { - public S visitProgramLLVM(ProgramLLVMImpl programImp, H h); + public S visitProgramLLVM(ProgramLLVMImpl e, H h); } - //////////DefineLLVM + //////////DefineLLVM (function) public interface DefineLLVM{ public S accept(DefineLLVMVisitor v, H h); public String prettyprinter(); } public interface DefineLLVMVisitor { - public S visitProgramLLVM(DefineLLVMImpl defineLLVMImp, H h); + public S visitProgramLLVM(DefineLLVMImpl e, H h); } + public interface InstructionLLVM{ + public S accept(InstructionLLVMVisitor v, H h); + public String prettyprinter(); + } + + public interface InstructionLLVMVisitor { + public S visitReturnLLVM(ReturnLLVMImp e, H h); + public S visitAssignLLVM(AssignLVMImp e, H h); + } + + //////////ExpressionLLVM (expression) + public interface ExpressionLLVM{ + public String prettyprinter(); + } + + public interface ExpressionLLVMVisitor { + public S visitConstLLVM(ConstLLVMImp e,H h); + public S visitBinOpLLVM(BinOpLLVMImp e, H h); + } + + public interface Val{ + public String prettyprinter(); + } public interface IdentifierLLVM{ //globaux @ et local % public String prettyprinter(); } - public interface InstructionLLVM{ - public String prettyprinter(); - } - - public interface ExpressionLLVM{ - public String prettyprinter(); - } - - public interface Val{ - public String prettyprinter(); - } - - }