2 USING: kernel parser namespaces io prettyprint math arrays sequences
3 words listener debugger
4 lisp lisp.lexer lisp.parser.mod lisp.listener.mod ;
8 : parse-stdio ( -- quot/f ) stdio get read-quot ;
10 : stuff? ( -- ? ) datastack length 0 > ;
13 [ parse-stdio [ call stuff? [ eval ] when ] [ bye ] if* ] try ;
18 [ listener-hook get call prompt. lisp-listen until-quit ]
21 : lisp-listener ( -- ) [
23 [ <sexp-lexer> ] >listener-lexer
24 [ in get create dup define-symbol ] >new-symbol-action
25 { "lisp" "lisp.syntax" } add-use
26 ! [ listener-hook get call prompt. lisp-listen ] until-quit