Skip to content

nsreeen/Pyforth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pyforth

A mini Forth implemented in Python. To visualize the stack go to: https://pyforth.herokuapp.com/visualizer


Terminal tool usage:

To run the REPL:

  1. You must have python 3.5 installed
  2. Save a copy of this directory locally (type git clone https://github.com/Nasreen123/Pyforth.git in your terminal)
  3. Type python pyforth/pyforth.py from the root of the directory (don't go into a subfolder)

To interpret a Forth file and run the REPL:

  1. Save the file in your copy of this directory
  2. Type python pyforth/pyforth.py <filename>

Builtin words implemented so far:


.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

About

Forth implemented in python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published