A simple RPN calculator now, a potential Forth interpreter later
Clone the repo:
git clone https://github.com/slothscript/stakku.git
cd stakkuBuild:
mkdir build && cd build
cmake ..
cmake --build .Install (Optional):
cmake --install .Format the C/C++ sources in place (uses the repo-root .clang-format):
find include src -type f \( -name '*.h' -o -name '*.cpp' \) -print0 | xargs -0 clang-format -iRun a command:
stakku 4 6 + .
10 ok
Run a file:
stakku example.stku
125
25
100 okOpen a REPL:
stakku or stakku repl
> 4 6 + .
10 ok
> 10
ok
> 12
ok
> +
ok
> .
22 okCurrently, stakku is a WIP, but aims to become a full Forth interpreter/compiler.
As of now, it supports: + - * / . dup drop swap over emit clear cr