aboutsummaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
Diffstat (limited to 'res')
-rw-r--r--res/test_add.tpc5
-rw-r--r--res/test_global.tpc11
-rw-r--r--res/test_mul.tpc7
3 files changed, 11 insertions, 12 deletions
diff --git a/res/test_add.tpc b/res/test_add.tpc
index 2f6b9dd..848130c 100644
--- a/res/test_add.tpc
+++ b/res/test_add.tpc
@@ -1,12 +1,11 @@
1/* test-table-symboles.tpc */
2
3/* Test file for simplified translator of a declaration of variables in C */
4entier a; 1entier a;
5 2
6entier main(void) { 3entier main(void) {
7 entier a,b,res; 4 entier a,b,res;
8 a = 2; 5 a = 2;
9 b = 3; 6 b = 3;
7 res = a + b;
8 print(res);
10 res = a - b; 9 res = a - b;
11 print(res); 10 print(res);
12} 11}
diff --git a/res/test_global.tpc b/res/test_global.tpc
index 731fffb..8fda248 100644
--- a/res/test_global.tpc
+++ b/res/test_global.tpc
@@ -1,15 +1,14 @@
1/* test-table-symboles.tpc */
2
3/* Test file for simplified translator of a declaration of variables in C */
4entier r1,b,s,c,r2 ; 1entier r1,b,s,c,r2 ;
5caractere letter, digit, punct; 2caractere letter, digit, punct;
3entier i;
4
6 5
7void calcul(void) { 6void calcul(void) {
8 entier i;
9 i = 3;
10 r1=12; 7 r1=12;
11 r2=13; 8 r2=13;
12 b = r1 + r2 + i; 9 s = 3;
10
11 b = r1 + r2 + s;
13 print(b); 12 print(b);
14} 13}
15 14
diff --git a/res/test_mul.tpc b/res/test_mul.tpc
index f3b6705..62a8080 100644
--- a/res/test_mul.tpc
+++ b/res/test_mul.tpc
@@ -1,12 +1,13 @@
1/* test-table-symboles.tpc */
2
3/* Test file for simplified translator of a declaration of variables in C */
4entier a; 1entier a;
5 2
6entier main(void) { 3entier main(void) {
7 entier a,b,res; 4 entier a,b,res;
8 a = 2; 5 a = 2;
9 b = 3; 6 b = 3;
7 res = a * b;
8 print(res);
9 res = a / b;
10 print(res);
10 res = a % b; 11 res = a % b;
11 print(res); 12 print(res);
12} 13}