aboutsummaryrefslogtreecommitdiff
path: root/res/ko_sample.tpc
diff options
context:
space:
mode:
authorpacien2018-02-23 01:11:34 +0100
committerpacien2018-02-23 01:11:34 +0100
commit806dd4ff649a1fb9a28dc469cc17d7dd5dbc1da5 (patch)
treeda414ebbb1807a2dea82235faa429f6e6613db69 /res/ko_sample.tpc
parent11acfa2e75350d31a665b8ee99925916c2c8b5f1 (diff)
downloadtpc-compiler-806dd4ff649a1fb9a28dc469cc17d7dd5dbc1da5.tar.gz
Adapt for new grammar
Diffstat (limited to 'res/ko_sample.tpc')
-rw-r--r--res/ko_sample.tpc24
1 files changed, 24 insertions, 0 deletions
diff --git a/res/ko_sample.tpc b/res/ko_sample.tpc
new file mode 100644
index 0000000..f3a4c7a
--- /dev/null
+++ b/res/ko_sample.tpc
@@ -0,0 +1,24 @@
1/**
2 * UPEM / Compilation / Projet TPC
3 * Exemple de fichier source TPC invalide
4 * Pacien TRAN-GIRARD, Adam NAILI
5 */
6
7const special = 'b';
8
9char funky_func(int arg) {
10 return !arg;
11}
12
13void main(void) {
14 void ret;
15 ret = 1 + funky_func(0) * 2;
16
17 while (ret) {
18 readc(ret);
19 print(ret);
20
21 if (ret == special) print('!');
22 }
23}
24