A mini Forth implemented in Python. To visualize the stack go to: https://pyforth.herokuapp.com/visualizer
To run the REPL:
- You must have python 3.5 installed
- Save a copy of this directory locally (type
git clone https://github.com/Nasreen123/Pyforth.gitin your terminal) - Type
python pyforth/pyforth.pyfrom the root of the directory (don't go into a subfolder)
To interpret a Forth file and run the REPL:
- Save the file in your copy of this directory
- Type
python pyforth/pyforth.py <filename>
.S DUP * + - = < >
OVER SWAP ROT DROP NIP TUCK 2DUP MOD
: ; ! @ ,
> R R> R@ R0
IF ELSE THEN DO LOOP I J
.D // prints the dictionary, only works in the terminal