igorw/ilias

Naive LISP implementation in PHP.

Maintainers

👁 igorw

Package info

github.com/igorw/ilias

pkg:composer/igorw/ilias

Statistics

Installs: 9

Dependents: 0

Suggesters: 0

Stars: 23

Open Issues: 3

dev-master 2013-10-28 14:49 UTC

Requires

  • php: >=5.4.0

Requires (Dev)

None

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT a321e52a2b618fd6ef494898827c91dd61fa5799

  • Igor Wiedler <igor.woop@wiedler.ch>

lisp

This package is not auto-updated.

Last update: 2026-06-20 21:37:59 UTC


README

Naive LISP implementation in PHP. For something more complete, check out Lisphp.

Check out the s-expression blog posts explaining the implementation of Ilias.

Usage

use Igorw\Ilias\Program;
use Igorw\Ilias\Lexer;
use Igorw\Ilias\Reader;
use Igorw\Ilias\FormTreeBuilder;
use Igorw\Ilias\Walker;
use Igorw\Ilias\Environment;

$program = new Program(
 new Lexer(),
 new Reader(),
 new FormTreeBuilder(),
 new Walker()
);

$env = Environment::standard();
$value = $program->evaluate($env, '(+ 1 2)');
var_dump($value);

will output:

int(3)