An open API service indexing awesome lists of open source software.

https://github.com/radeusgd/pylisp

Simple LISP interpreter
https://github.com/radeusgd/pylisp

Last synced: 2 months ago
JSON representation

Simple LISP interpreter

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.