Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • main
1 result

Target

Select target project
No results found
Select Git revision
  • main
1 result
Show changes
......@@ -24,7 +24,7 @@ public class SaEval extends SaDepthFirstVisitor <TypeVal> {
try{
appelMain.accept(this);
} catch(Exception e){
e.printStackTrace()
e.printStackTrace();
}
}
......
......@@ -19,7 +19,7 @@ fibo fbegin #entree fonction
fend
1 fend
main fbegin #entree fonction
param 9
param 3
@7 = call fibo
write @7
fend
......@@ -18,16 +18,16 @@ ERR_LEX_CODE = 6
SC_COEFF = 4
SA_DIFF_COEFF = 0
TS_DIFF_COEFF = 0
SA_COEFF = 3
SA_COEFF = 4
C3A_DIFF_COEFF = 0
C3A_COEFF = 3
C3A_COEFF = 4
PRE_NASM_DIFF = 0
PRE_NASM_COEFF = 3
NASM_DIFF_COEFF = 0
NASM_COEFF = 3
EXE_COEFF = 0
ERR_TS_COEFF = 2
ERR_TYPE_COEFF = 2
ERR_TYPE_COEFF = 0
# Paths relative to this file (evaluate.py)
inputPath = "./input/"
......
......@@ -10,5 +10,5 @@ entier fibo( entier n )
main()
{
ecrire( fibo( 9 ) );
ecrire( fibo( 3 ) );
}
......@@ -72,7 +72,7 @@ main : push ebp ;sauvegarde la valeur de ebp
push ecx ;sauvegarde de ecx
push edx ;sauvegarde de edx
sub esp, 0 ;allocation des variables locales
push 9 ;Param
push 3 ;Param
sub esp, 4 ;allocation mémoire pour la valeur de retour
call fibo
pop eax ;récupération de la valeur de retour
......
55
3
......@@ -72,7 +72,7 @@ main : push ebp ;sauvegarde la valeur de ebp
push ecx ;sauvegarde de ecx
push edx ;sauvegarde de edx
sub esp, 0 ;allocation des variables locales
push 9 ;Param
push 3 ;Param
sub esp, 4 ;allocation mémoire pour la valeur de retour
call fibo
pop @7 ;récupération de la valeur de retour
......
(SaProg null (SaLDecFonc (SaDecFonc fibo entier (SaLDecVar (SaDecVarSimple n entier) null) null (SaInstBloc (SaLInst (SaInstSi (SaExpInf (SaExpVar (SaVarSimple n)) 2) (SaInstBloc (SaLInst (SaInstRetour 1) null)) (SaInstBloc (SaLInst (SaInstRetour (SaExpAdd (SaExpAppel (SaAppel fibo (SaLExp (SaExpSub (SaExpVar (SaVarSimple n)) 1) null))) (SaExpAppel (SaAppel fibo (SaLExp (SaExpSub (SaExpVar (SaVarSimple n)) 2) null))))) null))) null))) (SaLDecFonc (SaDecFonc main nul null null (SaInstBloc (SaLInst (SaInstEcriture (SaExpAppel (SaAppel fibo (SaLExp 9 null)))) null))) null)))
(SaProg null (SaLDecFonc (SaDecFonc fibo entier (SaLDecVar (SaDecVarSimple n entier) null) null (SaInstBloc (SaLInst (SaInstSi (SaExpInf (SaExpVar (SaVarSimple n)) 2) (SaInstBloc (SaLInst (SaInstRetour 1) null)) (SaInstBloc (SaLInst (SaInstRetour (SaExpAdd (SaExpAppel (SaAppel fibo (SaLExp (SaExpSub (SaExpVar (SaVarSimple n)) 1) null))) (SaExpAppel (SaAppel fibo (SaLExp (SaExpSub (SaExpVar (SaVarSimple n)) 2) null))))) null))) null))) (SaLDecFonc (SaDecFonc main nul null null (SaInstBloc (SaLInst (SaInstEcriture (SaExpAppel (SaAppel fibo (SaLExp 3 null)))) null))) null)))