What is Scratching Forth?
Scratching Forth is a compiler from Forth to MIT Scratch .sb2 files. It is written in Python, and released under the MIT license.
How to install
Make sure you have Python 3.5 installed, and then clone this repo to your computer with git clone https://github.com/BookOwl/scratching-forth
How to run
Cd into the cloned repo, and run python3 main.py source.fs
.
To see all the options, run python3 main.py -h
I found a bug or I have a great idea!
Great! Please make an issue with your bug report or suggestion. PRs are welcomed.
What words does Scratching Forth support?
Scratching Forth currently support the following words:
- +
- -
- *
- /
- DUP
- DROP
- MOD
- /MOD
- SWAP
- ROT
- OVER
- .
- CR
- =
- IF ... [ELSE ...] THEN
- >
- <
- 0=
- 0>
- 0<
- AND
- OR
- 1+
- 1-
- 2+
- 2-
- 2*
- 2/
- ABS
- NEGATE
- MIN
- MAX
Scratching Forth does not have support for the return stack (yet).