madlisp/repl.php

19 lines
285 B
PHP
Raw Normal View History

2020-05-26 08:43:59 +00:00
<?php
2020-05-27 09:27:47 +00:00
require_once('lib.php');
require_once('lisp.php');
$env = ml_get_env();
2020-05-26 08:43:59 +00:00
while (true) {
$input = readline('> ');
try {
2020-05-27 09:27:47 +00:00
print(ml_rep($input, $env));
2020-05-26 08:43:59 +00:00
} catch (MadLispException $ex) {
print('error: ' . $ex->getMessage());
}
print(PHP_EOL);
}