Browse Source

Commit pour merge

Elies Tali 2 years ago
parent
commit
f4085f7d19
2 changed files with 12 additions and 9 deletions
  1. 11
    8
      Fichiers_Tests/progC
  2. 1
    1
      Tables/Symboles/table_symboles.c

+ 11
- 8
Fichiers_Tests/progC View File

@@ -1,12 +1,15 @@
1
-int fonction(int p){ 
2
-	int y = p*3;
3
-	return y;
1
+int g(int o){
2
+	int j = o * 2;
3
+	return j;
4
+}
5
+
6
+
7
+int f(int p){
8
+	int y = p + 2;
9
+	return y - 5 + g(1);
4 10
 }
5 11
 
6 12
 int main(){
7
-	int a;
8
-	int c = fonction(3);
9
-	stop(3);
10
-	printf(c);
11
-	printf(c);
13
+	int a = 7;
14
+	int c = f(a);
12 15
 }

+ 1
- 1
Tables/Symboles/table_symboles.c View File

@@ -34,7 +34,7 @@ Opérations possible :
34 34
 
35 35
 int last_addr = 0;
36 36
 int temp_addr = MAXADDR;
37
-int taille_types[] = {-1, 4};
37
+int taille_types[] = {-1, 1};
38 38
 int profondeur = 0;
39 39
 int last_temp_var_size;
40 40
 const struct type_t integer = {INT, 0, 1};

Loading…
Cancel
Save