;"NOTE: This pakcage can only be used compiled. Loading BACKQUOTE causes subsequent READs to interpret backquote as a special character. Backquote quotes the following object EXCEPT for objects within it that are preceeded by a tilde. Thus `<+ ~.A .INC> is equivalent to This is most useful in defining MACROs, although it can be used anywhere a program needs to construct a large object, most of which is constant. Note that BACKQUOTE makes no guarantees about ==?-ness of the objects it creates, so no PUTs or PUTRESTs should be done on them. Backquotes can be nested--they can be used to define macros that define macros. Tilde is not treated as a special character unless it is inside a backquoted object." ANY>> ) TILDE>> > .READ-TABLE) ( ,READ-TABLE)>) (NRT: >>)) .NRT>)> 1> [!\~ !\A %<> ,TILDE-READ-MACRO %<>]> > .NRT)) >)) <1 .B>) (ELSE
)>>>>> ;"Objects wrapped in a tilde should be evaluated. All other objects should be quoted. BACKQUOTIFY's job is to return an object that contains no TILDEs, although it may (and usually will) return an object of type TILDE to indicate that the EVALUATION of the contents is the object desired, not the object itself. The convention of marking objects that should be evaluated with TILDE could be changed to marking objects that should not be evaluated with QUOTE, but since we expect most of the item to be quoted, this would be less efficient." > .OBJ) (ELSE )) ;"Only lists and vectors can contain interesting objects (like TILDEs), so any other primtype can just be passed on like the monads." %<>)) ;"BACKQUOTIFY each of the sub-objects, and remember the last one that came back tilded." >>> )>> .OBJ:> )) <1 .ROBJ <1 .SUBOBJ>> 0) (ELSE 2)>>>> ) SEGMENT>)> )>) (> ;"the list of self-quoting objects that I trust" <1 .ROBJ >)>> .OBJ:> ;"Make sure the object evaluates to the right type, shove it in a tilde, and return it." > >>)> <1 .FLAG .OBJ> .FLAG) ;"If all of the sub-objects were quoted, just return the (now un-tilded) object." (ELSE .OBJ)>>) (<==? .PTYP VECTOR> ;"All of the comments for lists apply to vectors, except for the !'(...) trick." )) #DECL ((FLAG) ) >>> )>> .OBJ:> )) <1 .ROBJ <1 .SUBOBJ>>) (> ;"the list of self-quoting objects that I trust" <1 .ROBJ >)>> .OBJ:> > >>)> <1 .FLAG .OBJ> .FLAG) (ELSE .OBJ)>>) (ELSE .OBJ)>>)>> ) ,READ-TABLE)) 128> >)) .NRT> >) (ELSE )>) (ELSE >>)>>) (ELSE >>)> 1> [!\` !\A %<> ,BACKQUOTE-READ-MACRO %<>]> )) )) ) (ELSE .LVAL)) 128> >)) .NRT> >)> 1> [!\` !\A %<> ,BACKQUOTE-READ-MACRO %<>]>>)>> >) (ELSE )>> T> > )>