diff options
author | dan <[email protected]> | 2023-05-25 11:33:14 -0400 |
---|---|---|
committer | dan <[email protected]> | 2023-05-25 11:33:14 -0400 |
commit | 742bcacc541e76ea2a982a8f14aafe48aae33dec (patch) | |
tree | 5141b2db71b1cf660d1aefea7031fee9a84c97c8 | |
parent | 40e23d550506659f7a33057bbbc23cb1cf0632f1 (diff) | |
download | forth-742bcacc541e76ea2a982a8f14aafe48aae33dec.tar.gz forth-742bcacc541e76ea2a982a8f14aafe48aae33dec.tar.bz2 forth-742bcacc541e76ea2a982a8f14aafe48aae33dec.zip |
docs: update readme.md ; add run-rlwrap makefile command; add rlwrap completions file
-rw-r--r-- | makefile | 7 | ||||
-rw-r--r-- | readme.md | 15 | ||||
-rw-r--r-- | rlwrapcompletions.forth | 19 |
3 files changed, 36 insertions, 5 deletions
diff --git a/makefile b/makefile new file mode 100644 index 0000000..db42381 --- /dev/null +++ b/makefile @@ -0,0 +1,7 @@ +build: + gcc forth.c optable.c stack.c -o forth +run: + ./forth +run-rlwrap: + rlwrap -r -f rlwrapcompletions.forth ./forth + @@ -2,9 +2,14 @@ Forth-style Stack Language with C and JS implementations. JS implementation can be run by opening index.html in a web browser or running `node forth.js`. -C implementation can be compiled with gcc (`gcc forth.c -o forth`) and then run `./forth`. +Assuming you have gcc and make installed, the C implementation can be built with `make build`, then run with `./forth`. + +If you also have rlwrap installed, you can run `make run-rlwrap`, to get completions, history, and more pleasant line-editing. + +_Be aware:_ + + - Neither implementation is finished + - The instruction sets have _different_ missing features + - This is a toy language, not intended for serious use + -Be aware: -- Neither implementation is finished -- The instruction sets have _different_ missing features -- This is a toy language, not intended for serious use diff --git a/rlwrapcompletions.forth b/rlwrapcompletions.forth new file mode 100644 index 0000000..80e9a36 --- /dev/null +++ b/rlwrapcompletions.forth @@ -0,0 +1,19 @@ +pop +push +peek +if +then +: +; ++ +- +* +/ +dup +dump +not += +swap +drop +over +rot |