Skip to content

kstrempel/pactor

Repository files navigation

Pactor Programming Language

Forth, Factor like programming language in Python.

Motivation

My main motivation is to learn more about language design, compiler construction and concatenative languages.

State

Very experimental

How to develop or use it

Clone the repository to your local machine. Create a virtual environment.

The code is only tested with python 3.8.

Activate a Command Line

Create a link to the pactor command line tool.

ln -s src/pactor.py pactor

Run now ./pactor examples/hello.pactor

Testing

Run the complete suite.

python setup.py test

Small Example

examples/recur.pactor

:print(x--) str "print(" swap + ")" + python;
:recur(x--y) 1 - dup 0 > [dup print recur] when;
10 recur

prints

9
8
7
6
5
4
3
2
1

About

A forth, factor like concatenative language on top of the python ecosystem.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages