madlisp/repl.php

18 lines
238 B
PHP
Raw Normal View History

2020-05-26 08:43:59 +00:00
<?php
require('lisp.php');
while (true) {
$input = readline('> ');
print('% ');
try {
ml_rep($input);
} catch (MadLispException $ex) {
print('error: ' . $ex->getMessage());
}
print(PHP_EOL);
}