OK A Tester
This commit is contained in:
parent
f4356f9d58
commit
87e913b228
5 changed files with 18 additions and 10 deletions
|
@ -1,10 +1,18 @@
|
|||
int fonction(int p){
|
||||
int y = p*3;
|
||||
return y;
|
||||
int g(int tab[]){
|
||||
tab[1] = 10;
|
||||
printf(tab[0]);
|
||||
stop(15);
|
||||
return 2;
|
||||
}
|
||||
|
||||
int f(int p[]){
|
||||
p[0] = 1;
|
||||
g(p);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int main(){
|
||||
int a;
|
||||
int c = fonction(3);
|
||||
stop(3);
|
||||
int a[5];
|
||||
f(a);
|
||||
printf(a[1]);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Produit par GNU Bison 3.5.1.
|
||||
// Produit par GNU Bison 3.0.4.
|
||||
// Rapporter les bugs à <bug-bison@gnu.org>.
|
||||
// Page d'accueil: <https://www.gnu.org/software/bison/>.
|
||||
// Page d'accueil: <http://www.gnu.org/software/bison/>.
|
||||
|
||||
digraph "Lex_Yacc/as.y"
|
||||
{
|
||||
|
|
|
@ -104,7 +104,7 @@ else{
|
|||
$$ = push("0_TEMPORARY_RETURN", 0, fonc.return_type);
|
||||
}};
|
||||
|
||||
Invocation : tPRINTF tOBRACE E tCBRACE{add_operation(PRI,$3,0,0); pop();};
|
||||
Invocation : tPRINTF tOBRACE E tCBRACE{add_operation(PRI,$3,0,0);};
|
||||
|
||||
Params : {$$ = 0; printf("Sans Params\n"); } ;
|
||||
Params : Param SuiteParams {$$ = $2 + 1;};
|
||||
|
|
Binary file not shown.
|
@ -34,7 +34,7 @@ Opérations possible :
|
|||
|
||||
int last_addr = 0;
|
||||
int temp_addr = MAXADDR;
|
||||
int taille_types[] = {-1, 4};
|
||||
int taille_types[] = {-1, 1};
|
||||
int profondeur = 0;
|
||||
int last_temp_var_size;
|
||||
const struct type_t integer = {INT, 0, 1};
|
||||
|
|
Loading…
Reference in a new issue