Go to file
2021-06-01 07:42:45 +07:00
bin do not print out result by default, only with the -p option 2021-06-01 07:42:45 +07:00
mad add eval.mad 2020-12-24 08:44:57 +07:00
src add standard I/O streams and few functions 2020-12-25 08:38:45 +07:00
test add support for special characters in strings: vertical tab, null 2020-12-21 09:13:27 +07:00
.gitignore unit tests for Tokenizer 2020-12-15 09:03:54 +07:00
composer.json update composer.json 2020-12-20 09:08:19 +07:00
LICENSE add license file 2020-12-06 11:11:21 +07:00
phpunit.xml unit tests for Tokenizer 2020-12-15 09:03:54 +07:00
README.md fix autoloading, add quickstart to readme 2020-12-20 10:01:42 +07:00

MadLisp

MadLisp is a Lisp interpreter written in PHP.

Requirements

The project requires PHP 7.4 or newer and Composer.

Quickstart

Create a new directory and require the project using composer:

$ mkdir mylisp
$ cd mylisp
$ composer require "maddy83/madlisp dev-master"

Use the vendor/bin/madlisp executable to start the interpreter. Start the REPL with the -r option:

$ vendor/bin/madlisp -r
>

You can evaluate Lisp code interactively inside the REPL:

> (+ 1 2 3)
6

Alternatively you can evaluate a file that contains Lisp code:

$ echo "(+ 1 2 3)" > mylisp.mad
$ vendor/bin/madlisp mylisp.mad
6

Documentation

The full documentation is available on the project website.

License

MIT