Update readme and examples

archive/forth
Ethan Reece 2023-09-30 01:58:05 -05:00
parent 067150a682
commit 83aa5bd4d3
Signed by: me
GPG Key ID: D3993665FF92E1C3
5 changed files with 11 additions and 3 deletions

View File

@ -12,9 +12,17 @@ Main repo: https://git.sudoer.ch/me/really-bad-compiler-in-haskell
## Run Instructions
- Use `stack run <file>` to run the program (for example, `stack run example/1`).
- Use `stack run <file>` to run the program (for example, `stack run example/1.fs`).
- The LLVM will be generated as `a.out.ll`, and the executable will be generated as `a.out`.
## Language
It is planned to be similar to Forth, unless it turns out that Forth does not have the features I am looking for.
Currently, it supports positive integers, `+`, `-`, `*`, `/`, and `.` (pops from stack and outputs to console).
The supported syntax for this compiler aims to be compatible with Gforth.
## To edit
I recommend using VSCodium, which is preconfigured to have syntax highlighting and (currently broken) debugging features and will automatically suggest the Haskell extensions to install.

View File

@ -1 +0,0 @@
5*3+2

1
example/1.fs 100644
View File

@ -0,0 +1 @@
5 3 * 2 + .

View File

@ -1 +0,0 @@
6+8/3

1
example/2.fs 100644
View File

@ -0,0 +1 @@
6 8 3 / + .