[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
programs writing backquote
Date: 28 May 85 14:38 PDT
In part of the discussion over nesting depth of backquote, more than one
person alluded to the possibility that a *program* could write a 3-deep
nested backquote and that this was generally a good thing.
However, as far as I can tell, it would be easier for a Snobol program
to write nested backquotes rather than Lisp, because there is no defined
S-expression representation of backquotes... the only thing GSSB ( Guy
Steele's Silver Book) defines is the surface syntax.
Do I misunderstand? Can someone give a program which creates a Common
Lisp 3-deep-nested backquote, without resorting to string manipulations?
The program that manipulates the common lisp does not itself have to be
written in common lisp. (eg, we've already conceded you can't write a real time
editor in common lisp, but that doesn't free us from the constraint that
common lisp code must be editable...)
In fact, the programs that I have which manipulate common backquote structure
are written in Zetalisp and they make assumptions about the internal representation
of backquoted structure.
However, all that aside, it is completely trivial to write a common lisp program
which has its own readtable and its own representation for backquoted structure
and whose sole job in life is to read in expressions, frob their backquoted
structure using its private representation, and write them back out.
... not to mention manipulating the expression at the text level -- such as
using just c-m-K and c-Y in Emacs to move a doubly nested backquote expression
inside a macro which already has a level of backquote ... something I do all
the time without the aid of any tools fancier than Emacs...