Trailing-Edge
-
PDP-10 Archives
-
decuslib20-01
-
decus/20-0004/bquote.tty
There are no other files named bquote.tty in the archive.
BQUOTE: A "BACKQUOTE" facility
This is similar to the facility of the same name in other
common lisp dialects as follows:
|'form is equivalent to 'form, except that, in the body
of form, an element preceded by a "," is evaluated.
An element preceded by ",@" is evaluated and spliced in,
using APPEND. An element preceded by ",." is spliced
in, using NCONC..
For example, |'(A ,B ,@C ,.D E) is equivalent to
(CONS 'A (CONS B (APPEND C (NCONC D '(E]
IMPLEMENTATION:
| is given a read macro, such that |'form reads in
as (BQUOTE form). (the readmacro is in T, FILERDTBL
and EDITRDTBL). During the READing of form (but
not outside a |' context), "," is given a read macro
such that ,X reads in as (BQUOTE, , X). You will see
BQUOTE and BQUOTE, if you edit a function using
|', although if you prettyprint it, it will prettyprint as
typed in.
BQUOTE has a macro property to expand out its argument
into the appropriate nest of CONSes and APPENDs, looking
for BQUOTE,s.
BQUOTE has an entry on PRETTYPRINTMACROS so that BQUOTEd
expressions will prettyprint with |'.
Rationale: No new special characters have been added, so
that old programs, even with ,'s and |'s in them, will
continue to load in.
|' has been implemented in such a way that it
doesn't conflict with the use of | as the "changechar";
since "|" has heretofor been a SEPR, this means that it
should be possible to load BQUOTE and not worry about
files made without "|" preceeded by a "%".
The read macro doesn't expand the form into CONSes and
APPENDs because it is important that functions which
use backquote prettyprint reasonably.
Larry