aboutsummaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
authorAdam NAILI2018-06-06 02:14:35 +0200
committerAdam NAILI2018-06-06 02:14:35 +0200
commit7ab0b07d8224280330320238c45889c460cd0bda (patch)
tree93695a064ffdfabe1d113d5f5ebb77addbb775b2 /res
parentd9f0d3f59f39f7787b0aa41a8e2e82244bad9d37 (diff)
downloadtpc-compiler-7ab0b07d8224280330320238c45889c460cd0bda.tar.gz
Fix const + fix entier x,y,...
Diffstat (limited to 'res')
-rw-r--r--res/nani.tpc1
-rw-r--r--res/test_if.tpc14
2 files changed, 12 insertions, 3 deletions
diff --git a/res/nani.tpc b/res/nani.tpc
deleted file mode 100644
index dbb3731..0000000
--- a/res/nani.tpc
+++ /dev/null
@@ -1 +0,0 @@
1/*Programme correct avec le compilateur mais qui ne devrait pas*/
diff --git a/res/test_if.tpc b/res/test_if.tpc
index adb097a..054811b 100644
--- a/res/test_if.tpc
+++ b/res/test_if.tpc
@@ -3,10 +3,20 @@
3/* Test file for simplified translator of a declaration of variables in C */ 3/* Test file for simplified translator of a declaration of variables in C */
4 4
5entier main(void) { 5entier main(void) {
6 entier bool1,bool2; 6 entier bool1, bool2;
7 bool1 = 0; 7 bool1 = 0;
8 bool2 = 0; 8 bool2 = 0;
9 if(bool1 == bool2){ 9 if(bool1 == bool2){
10 print(0); 10 if(bool1 != bool2){
11 print('n');
12 }
13 else{
14 if(bool1 <= bool2){
15 print('o');
16 return 0;
17 }
18 print('n');
19 }
11 } 20 }
21 return 0;
12} 22}