7 ((lexed-ast (let ((ast (clnl-lexer:lex str)))
8 (format t "Via lexing, AST for~%~S~% became~%~S~%~%" str ast) ast))
9 (parsed-ast (let ((ast (clnl-parser:parse lexed-ast)))
10 (format t "Via parsing, AST for~%~S~% became~%~S~%~%" lexed-ast ast) ast))
11 (transpiled-ast (let ((ast (clnl-transpiler:transpile-commands parsed-ast)))
12 (format t "Via transpiling, AST for~%~S~% became~%~S~%" parsed-ast ast) ast)))
13 (eval transpiled-ast)))
15 (defun p (result) result)
19 :for str := (progn (format t "> ") (force-output) (read-line))
25 (clnl-random:set-seed 15)
26 (clnl-nvm:create-world))
28 (defun run-commands (cmds)
29 (eval (clnl-transpiler:transpile-commands (clnl-parser:parse (clnl-lexer:lex cmds)))))
31 (defun run-reporter (reporter)
32 (eval (clnl-transpiler:transpile-reporter (car (clnl-parser:parse (clnl-lexer:lex reporter))))))