mirror of
https://github.com/peklaiho/madlisp.git
synced 2024-11-22 21:35:03 +00:00
23 lines
451 B
PHP
23 lines
451 B
PHP
<?php
|
|
require('vendor/autoload.php');
|
|
|
|
function ml_get_env(): MadLisp\Env
|
|
{
|
|
$env = new MadLisp\Env();
|
|
|
|
$core = new MadLisp\Lib\Core();
|
|
$core->register($env);
|
|
|
|
return $env;
|
|
}
|
|
|
|
function ml_get_lisp(): MadLisp\Lisp
|
|
{
|
|
$tokenizer = new MadLisp\Tokenizer();
|
|
$reader = new MadLisp\Reader();
|
|
$eval = new MadLisp\Evaller();
|
|
$printer = new MadLisp\Printer();
|
|
|
|
return new MadLisp\Lisp($tokenizer, $reader, $eval, $printer);
|
|
}
|