diff options
author | Adam NAILI | 2018-06-06 02:14:35 +0200 |
---|---|---|
committer | Adam NAILI | 2018-06-06 02:14:35 +0200 |
commit | 7ab0b07d8224280330320238c45889c460cd0bda (patch) | |
tree | 93695a064ffdfabe1d113d5f5ebb77addbb775b2 /res | |
parent | d9f0d3f59f39f7787b0aa41a8e2e82244bad9d37 (diff) | |
download | tpc-compiler-7ab0b07d8224280330320238c45889c460cd0bda.tar.gz |
Fix const + fix entier x,y,...
Diffstat (limited to 'res')
-rw-r--r-- | res/nani.tpc | 1 | ||||
-rw-r--r-- | res/test_if.tpc | 14 |
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 | ||
5 | entier main(void) { | 5 | entier 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 | } |