toLLVM, manque table des symboles, et expression pas correct

This commit is contained in:
Rochas
2025-04-05 00:08:50 +02:00
parent 59ba13fe18
commit 7dfb07d59f
5 changed files with 124 additions and 46 deletions

View File

@@ -1,5 +1,8 @@
package TP2.asd;
import java.util.ArrayList;
import java.util.List;
import TP2.asd.Program.*;
import TP2.llvm.Interface.*;
import TP2.llvm.ProgramLLVM.*;
@@ -31,7 +34,7 @@ public interface Interface{
public interface Instruction {
public <H,S> S accept(InstrVisitor<H,S> v, H h);
public String prettyprinter(String indent);
public InstructionLLVM toLLVM();
public ArrayList<InstructionLLVM> toLLVM();
}
public interface InstrVisitor<H,S>{
@@ -45,7 +48,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 ArrayList<AssignLVMImp> toLLVM();
}
public interface ExprVisitor<H,S> {
@@ -55,6 +58,7 @@ public interface Interface{
public interface Type{
public String prettyprinter();
public TypeLLVM toLLVM();
}
public enum Op {PLUS, MINUS, TIMES, DIV, MOD}