[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

TTYSCAN troubles.



    I think i have an answer.  It will unfortunately require a little
cooperation from Lisp -- a flag which says that the READ is not really
for "value" -- it is globally NIL, but when reading to drive a prescan
it is bound to T, and BREAK (Maclisp interrupt-bind too?) binds it
back to NIL.  This requires that all pre-scanned reads be two-pass.
This is already the case for the Maclisp interface.  It is trivial
to add to a tty-prescan of this type anyway, since the second pass
is like pretending a rubout was typed after the s-expr is completely
read (ie, start the read over again, with this flag set to NIL - the
tty prescan initially binds it to T).  The localized place which
decides how to make up a data-object (which is also the place which
decides to make a SQUID form instead) can check this flag and not
make the data object.  This requires that the form returned by the
readmacro or whatever not be depended on to be anything in particular
by surrounding forms.  But this generally needs to be the case anyway,
since in the compiler these will be SQUID forms.  For example,
"#O#,bporg" will lose in the Maclisp compiler because #O is doing
a bit too much error checking.