tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Tinycc-devel] Announcing interactive REPL for TCC. It's RAD.


From: Henry Kroll
Subject: [Tinycc-devel] Announcing interactive REPL for TCC. It's RAD.
Date: Fri, 21 Apr 2023 22:31:12 -0800
User-agent: Evolution 3.46.4 (3.46.4-1.fc37)

I forked Andy Balaam's (2009) Interactive GCC (igcc) read-eval-print
loop (REPL) for C/C++ programmers.

I upgraded it to Python3 and added TCC compiler support!

The result is a tiny, interactive shell for rapid application
development (RAD). I use it for testing individual lines of code with
TCC and C. Example:


 $ ./itcc
 tcc> int a = 5;
 tcc> a -= 2;
 tcc> if (a < 4) {
 ['-:16: error: identifier expected']
 tcc>    printf("a is %i\n", a);
 ['-:17: error: identifier expected']
 tcc> }
 a is 3
 tcc> |

There are some errors, caused by having an open brace. Ignore those.
The answer is printed once a closing brace is entered.

It is a lot like using Python's interactive shell REPL.

Hoping this will be useful to speed up testing code for TCC.

But as always NO WARRANTEE provided by GPL. Published on GitHub.
Tracking issues there: https://github.com/themanyone/itcc

Happy coding!

Henry



reply via email to

[Prev in Thread] Current Thread [Next in Thread]