A toy Forth interpreter written in C, inspired by Salvatore Sanfilippo's "Learn C" YouTube series.
makeThis compiles main.c with GCC and produces the toyforth executable.
./toyforth <filename>
./toyforth -d <filename> # debug modeCreate a file with Forth code and run it:
# nums.ft - basic arithmetic
10 20 + 1 +$ ./toyforth nums.ft
[10,20,+,1,+]
Stack context at end:
[31]Currently supported operations: +, -, *, /, %
To experiment with a full Forth implementation, you can run gforth via Docker:
docker run -it --rm forthy42/gforthApache 2.0