detection d'erreur Fonction/Proto + harmonisation nom des Class dans ProgramLLVM (mélange de 'Imp' et 'Impl')
This commit is contained in:
@@ -9,7 +9,7 @@ import TP2.llvm.Interface.*;
|
||||
public class ProgramLLVM {
|
||||
|
||||
//Program
|
||||
public static record ProgramLLVMImpl(ArrayList<Integer> declration ,ArrayList<DefineLLVM> fonctions) implements ProgLLVM{
|
||||
public static record ProgramLLVMImp(ArrayList<Integer> declration ,ArrayList<DefineLLVM> fonctions) implements ProgLLVM{
|
||||
public <H, S> S accept(ProgramLLVMVisitor<H, S> v, H h) {
|
||||
return v.visitProgramLLVM(this, h);
|
||||
}
|
||||
@@ -22,7 +22,7 @@ public class ProgramLLVM {
|
||||
|
||||
|
||||
//Define
|
||||
public static record DefineLLVMImpl(String name, TypeLLVM type, ArrayList<VarLLVMImpl> params, ArrayList<InstructionLLVM> instrs) implements DefineLLVM{
|
||||
public static record DefineLLVMImp(String name, TypeLLVM type, ArrayList<VarLLVMImp> params, ArrayList<InstructionLLVM> instrs) implements DefineLLVM{
|
||||
public <H, S> S accept(DefineLLVMVisitor<H, S> v, H h) {
|
||||
return v.visitDefineLLVM(this, h);
|
||||
}
|
||||
@@ -45,7 +45,7 @@ public class ProgramLLVM {
|
||||
}
|
||||
}
|
||||
|
||||
public static record BrCondLLVMImp(VarLLVMImpl var, String label, String labelElse) implements InstructionLLVM{
|
||||
public static record BrCondLLVMImp(VarLLVMImp var, String label, String labelElse) implements InstructionLLVM{
|
||||
@Override
|
||||
public <H, S> S accept(InstructionLLVMVisitor<H, S> v, H h) {
|
||||
return v.visitBrCondLLVM(this, h);
|
||||
@@ -53,42 +53,42 @@ public class ProgramLLVM {
|
||||
}
|
||||
|
||||
|
||||
public static record AssignLVMImpl(VarLLVMImpl var, ExpressionLLVM e) implements InstructionLLVM{
|
||||
public static record AssignLVMImp(VarLLVMImp var, ExpressionLLVM e) implements InstructionLLVM{
|
||||
@Override
|
||||
public <H, S> S accept(InstructionLLVMVisitor<H, S> v, H h) {
|
||||
return v.visitAssignLLVM(this, h);
|
||||
}
|
||||
}
|
||||
|
||||
public static record ReturnLLVMImpl(TypeLLVM type, ExpressionLLVM e) implements InstructionLLVM{
|
||||
public static record ReturnLLVMImp(TypeLLVM type, ExpressionLLVM e) implements InstructionLLVM{
|
||||
@Override
|
||||
public <H, S> S accept(InstructionLLVMVisitor<H, S> v, H h) {
|
||||
return v.visitReturnLLVM(this, h);
|
||||
}
|
||||
}
|
||||
|
||||
public static record StoreLLVMImpl(TypeLLVM valType, ExpressionLLVM e,TypeLLVM varType, ValLLVM var) implements InstructionLLVM{
|
||||
public static record StoreLLVMImp(TypeLLVM valType, ExpressionLLVM e,TypeLLVM varType, ValLLVM var) implements InstructionLLVM{
|
||||
@Override
|
||||
public <H, S> S accept(InstructionLLVMVisitor<H, S> v, H h) {
|
||||
return v.visitStoreLLVM(this, h);
|
||||
}
|
||||
}
|
||||
|
||||
public static record CallLLVMImpl(DefineLLVMImpl f, ArrayList<ValLLVM> params, String str) implements InstructionLLVM{
|
||||
public static record CallLLVMImp(DefineLLVMImp f, ArrayList<ValLLVM> params, String str) implements InstructionLLVM{
|
||||
@Override
|
||||
public <H, S> S accept(InstructionLLVMVisitor<H, S> v, H h) {
|
||||
return v.visitCallLLVM(this, h);
|
||||
}
|
||||
}
|
||||
|
||||
public static record PrintLLVMImpl(ArrayList<ValLLVM> l) implements InstructionLLVM{ //TODO c'est un Call qui appel la fonction print
|
||||
public static record PrintLLVMImp(ArrayList<ValLLVM> l) implements InstructionLLVM{ //TODO c'est un Call qui appel la fonction print
|
||||
@Override
|
||||
public <H, S> S accept(InstructionLLVMVisitor<H, S> v, H h) {
|
||||
return v.visitPrintLLVM(this, h);
|
||||
}
|
||||
}
|
||||
|
||||
public static record ReadLLVMImpl(ArrayList<ValLLVM> l) implements InstructionLLVM{ //TODO c'est un Call qui appel la fonction read
|
||||
public static record ReadLLVMImp(ArrayList<ValLLVM> l) implements InstructionLLVM{ //TODO c'est un Call qui appel la fonction read
|
||||
|
||||
@Override
|
||||
public <H, S> S accept(InstructionLLVMVisitor<H, S> v, H h) {
|
||||
@@ -97,7 +97,7 @@ public class ProgramLLVM {
|
||||
}
|
||||
|
||||
//Expression :
|
||||
public static record BinOpLLVMImpl(TypeLLVM type,Op op, ValLLVM val1,ValLLVM val2) implements ExpressionLLVM{
|
||||
public static record BinOpLLVMImp(TypeLLVM type,Op op, ValLLVM val1,ValLLVM val2) implements ExpressionLLVM{
|
||||
@Override
|
||||
public <H, S> S accept(ExpressionLLVMVisitor<H, S> v, H h) {
|
||||
return v.visitBinOpLLVM(this, h);
|
||||
@@ -123,7 +123,7 @@ public class ProgramLLVM {
|
||||
}*/
|
||||
|
||||
|
||||
public static record allocaLLVMImpl(TypeLLVM type) implements ExpressionLLVM{
|
||||
public static record allocaLLVMImp(TypeLLVM type) implements ExpressionLLVM{
|
||||
@Override
|
||||
public <H, S> S accept(ExpressionLLVMVisitor<H, S> v, H h) {
|
||||
return v.visitAllocaLLVM(this, h);
|
||||
@@ -136,7 +136,7 @@ public class ProgramLLVM {
|
||||
}
|
||||
|
||||
|
||||
public static record LoadLLVMImpl(ValLLVM val) implements ExpressionLLVM{
|
||||
public static record LoadLLVMImp(ValLLVM val) implements ExpressionLLVM{
|
||||
@Override
|
||||
public <H, S> S accept(ExpressionLLVMVisitor<H, S> v, H h) {
|
||||
return v.visitLoadLLVM(this, h);
|
||||
@@ -163,7 +163,7 @@ public class ProgramLLVM {
|
||||
|
||||
//Val
|
||||
|
||||
public static record ValLLVMImpl(TypeLLVM type, int val) implements ValLLVM{
|
||||
public static record ValLLVMImp(TypeLLVM type, int val) implements ValLLVM{
|
||||
@Override
|
||||
public <H, S> S accept(ExpressionLLVMVisitor<H, S> v, H h) {
|
||||
return v.visitValLLVM(this, h);
|
||||
@@ -176,7 +176,7 @@ public class ProgramLLVM {
|
||||
}
|
||||
|
||||
|
||||
public static record VarLLVMImpl(TypeLLVM type, String nom) implements ValLLVM{
|
||||
public static record VarLLVMImp(TypeLLVM type, String nom) implements ValLLVM{
|
||||
@Override
|
||||
public <H, S> S accept(ExpressionLLVMVisitor<H, S> v, H h) {
|
||||
return v.visitVarLLVM(this, h);
|
||||
@@ -189,7 +189,7 @@ public class ProgramLLVM {
|
||||
}
|
||||
|
||||
|
||||
public static record IntLLVMImpl() implements TypeLLVM{
|
||||
public static record IntLLVMImp() implements TypeLLVM{
|
||||
@Override
|
||||
public <H, S> S accept(TypeLLVMVisitor<H, S> v, H h) {
|
||||
return v.visitIntLLVM(this, h);
|
||||
@@ -197,7 +197,7 @@ public class ProgramLLVM {
|
||||
}
|
||||
|
||||
|
||||
public static record VoidLLVMImpl() implements TypeLLVM{
|
||||
public static record VoidLLVMImp() implements TypeLLVM{
|
||||
@Override
|
||||
public <H, S> S accept(TypeLLVMVisitor<H, S> v, H h) {
|
||||
return v.visitVoidLLVM(this, h);
|
||||
|
||||
Reference in New Issue
Block a user