Skip to content
4irikPublic

About

simple lisp-like interpreter written in php

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

Simple Lisp-like interpreter written on PHP

asciicast

Requirements

  • PHP 8.5

If you don't want to install PHP, you'll need:

  • docker
  • make

make starts a one-off php:8.5-alpine container. There is no image to build.

Usage

With docker

Install dependencies, then start the REPL:

$ make install
$ make repl

Without docker

$ ./repl

or

$ php repl.php

Development

  • make test — all tests
  • make analyze — static analysis (Mago)
  • make lint — linter (Mago)
  • make fmt — format PHP (Mago)
  • make help — list the commands

TODO

  1. Implement Tail Call Optimization (TCO) (https://en.wikipedia.org/wiki/Tail_call);
  2. Errors should point to lisp code;
  3. Support named arguments for interoperability with PHP.
  4. (eval-in form alist) evaluates form with an explicit association list (LISP 1.5 eval). The caller's local bindings are not visible.

About

simple lisp-like interpreter written in php

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages