From 40f423a4b3b1e64e8424ab239cc14ecc5077640f Mon Sep 17 00:00:00 2001 From: Adam NAILI Date: Sun, 22 Apr 2018 14:49:42 +0200 Subject: Beginning of the symbol table implementation --- res/ko_sample.tpc | 2 +- res/ok_sample.tpc | 4 ++-- res/test-table-symboles.tpc | 13 +++++++++++++ 3 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 res/test-table-symboles.tpc (limited to 'res') diff --git a/res/ko_sample.tpc b/res/ko_sample.tpc index f3a4c7a..9dc344f 100644 --- a/res/ko_sample.tpc +++ b/res/ko_sample.tpc @@ -6,7 +6,7 @@ const special = 'b'; -char funky_func(int arg) { +caractere funky_func(entier arg) { return !arg; } diff --git a/res/ok_sample.tpc b/res/ok_sample.tpc index 7591dfd..7b56e7f 100644 --- a/res/ok_sample.tpc +++ b/res/ok_sample.tpc @@ -6,12 +6,12 @@ const special = 'b'; -char funky_func(int arg) { +caractere funky_func(entier arg) { return !arg; } void main(void) { - char ret; + caractere ret; ret = 1 + funky_func(0) * 2; while (ret) { diff --git a/res/test-table-symboles.tpc b/res/test-table-symboles.tpc new file mode 100644 index 0000000..3c12144 --- /dev/null +++ b/res/test-table-symboles.tpc @@ -0,0 +1,13 @@ +/* test-table-symboles.tpc */ + +/* Test file for simplified translator of a declaration of variables in C */ + entier r1,b,s,c,r2 ; + caractere letter, digit, punct; + +entier main(void) { + r1=12; + r2=24; + b=r1+r2; + punct='.'; + return b; +} -- cgit v1.2.3