https://github.com/radeusgd/pylisp
Simple LISP interpreter
https://github.com/radeusgd/pylisp
Last synced: 2 months ago
JSON representation
Simple LISP interpreter
- Host: GitHub
- URL: https://github.com/radeusgd/pylisp
- Owner: radeusgd
- Created: 2020-04-08T20:17:50.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-04-13T22:49:17.000Z (about 5 years ago)
- Last Synced: 2025-01-25T11:41:32.663Z (4 months ago)
- Language: Python
- Size: 47.9 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PyLisp
A simple LISP interpreter in Python.
The LISP dialect implemented is my own variation on the language.
## Usage
To install run `pip install .`.
Usage:
`pylisp` to launch REPL, `pylisp program.cl` to execute a script.If you want to run the test suite, you can use the script `run_tests.sh`.
## Language
The language is mostly focused on functional aspects, but it has some imperative structures.
It's eagerly executed and uses static binding in closures.Syntax is usual to the LISP family, usable operators can be found in `pylisp/builtins.py`, some of them are:
let, letrec, define!, print!, fun, macro, quote, list, cons, nil, true, false, if, =.To get the full list, type `help` in the REPL.
To get documentation of a builtin, type `(help! builtin)` (for example `(help! letrec)`) in the REPL.