From c9c4fbbde6e4f4f3942777cd9930cf40375e0ea9 Mon Sep 17 00:00:00 2001 From: Adam NAILI Date: Fri, 4 May 2018 01:03:21 +0200 Subject: Add sub working (local/global not fully implemented, checking type function available --- res/nani.tpc | 1 + res/test-table-symboles.tpc | 5 +++-- res/test_add.tpc | 11 +++++++++++ 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 res/nani.tpc create mode 100644 res/test_add.tpc (limited to 'res') diff --git a/res/nani.tpc b/res/nani.tpc new file mode 100644 index 0000000..dbb3731 --- /dev/null +++ b/res/nani.tpc @@ -0,0 +1 @@ +/*Programme correct avec le compilateur mais qui ne devrait pas*/ diff --git a/res/test-table-symboles.tpc b/res/test-table-symboles.tpc index 3c12144..b2cc31e 100644 --- a/res/test-table-symboles.tpc +++ b/res/test-table-symboles.tpc @@ -1,10 +1,11 @@ /* 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 r1,b,s,c,r2 ; +caractere letter, digit, punct; entier main(void) { + r1=12; r2=24; b=r1+r2; diff --git a/res/test_add.tpc b/res/test_add.tpc new file mode 100644 index 0000000..01e0403 --- /dev/null +++ b/res/test_add.tpc @@ -0,0 +1,11 @@ +/* test-table-symboles.tpc */ + +/* Test file for simplified translator of a declaration of variables in C */ + +entier main(void) { + entier a,b,res; + a = 2; + b = 3; + res = a - b; + print(res); +} -- cgit v1.2.3