correction SymTable

This commit is contained in:
Rochas
2025-04-27 16:55:47 +02:00
parent af2e42ab89
commit 0105a3f59e
5 changed files with 157 additions and 98 deletions

58
tests/aLaMain2.vsl Normal file
View File

@@ -0,0 +1,58 @@
PROTO INT add(x,y)
FUNC INT add(x,y,z) {
INT z,a,b,c
y := x+y
RETURN z
}
FUNC INT main(x,y) {
INT a,b,c,minh
x := 5
minh := x * y
b:=3
c:=1
PRINT "coucou, tu peux réparer le visitPrint dans LLVM stp","il manque virgule au milieu", c*5+b
WHILE b - 1
DO{
b := b - 1
c := c + 1
WHILE b -1
DO{
b:= b - 1
c:= c + 1
WHILE b -1
DO{
b:= b - 1
c:= c + 1
}
DONE
}
DONE
}
DONE
WHILE b - 1
DO{
b := b - 1
c := c + 1
WHILE b -1
DO{
b:= b - 1
c:= c + 1
WHILE b -1
DO{
b:= b - 1
c:= c + 1
}
DONE
}
DONE
}
DONE
IF c -1
THEN READ a ELSE READ b
FI
b:=c+1
RETURN 4 + 6 * 5 + 2 }
PROTO INT type(x,y)