More work on glrepl window
[glrepl.git] / glreader.lisp
blob1c87620c2bda4c880ca5ef5d62619149a3fd9e9d
2 (in-package :glrepl)
4 (defconstant eof "Eof")
5 (defun eof-object? (x) (eq x eof))
7 (defvar *glrepl-readtable* (copy-readtable))
9 (defun glrepl-read (&optional (stream *standard-input*))
10 (let ((*readtable* *glrepl-readtable*))
11 (read stream nil eof)))
13 ;; use #[ ] to make pixels (noationally convenient)
14 (defun |#[reader| (stream char arg)
15 (declare (ignore char arg))
16 `(pixval ,@(read-delimited-list #\] stream t)))
18 (set-dispatch-macro-character #\# #\[ #'|#[reader| *glrepl-readtable*)