[comp.lang.lisp] ... as a symbol

dorai@titan.rice.edu (Dorai Sitaram) (04/01/89)

I'm asking this for a friend.

He needs to know how to make ... (3 consecutive dots) a symbol in CL,
so that he can use it as an ellipsis(sp?) symbol as in Scheme's
extend-syntax. He is currently using *** and/or ___, but these violate
his aesthetic sensibilities.

Thanks.

--dorai

barmar@think.COM (Barry Margolin) (04/01/89)

In article <2997@kalliope.rice.edu> dorai@titan.rice.edu (Dorai Sitaram) writes:
>He needs to know how to make ... (3 consecutive dots) a symbol in CL,

Any sequence of characters will be read as a symbol if it is enclosed
in vertical bars, so he can type |...| to get a symbol whose name is
three periods.  I believe \... may also work, but I'm not sure.

If he wants a way to permit it to be typed unadorned, I don't think
that can be done without breaking other things.  He can use
SET-SYNTAX-FROM-CHAR to cause it to be treated the same as an
alphabetic character, but then it would lose its treatment as the
consing dot and as the decimal point in numbers.

By the way, the reason that ... is required to signal an error is that
it is generated when the printer abbreviates output due to
*PRINT-LENGTH*.  The intent is to guarantee that if output was
abbreviated when sent to a file, and an attempt is made to read that
file, the loss of information will result in an error being signalled.

If your friend manages to make ... read as a symbol, how does he
propose to deal with the ambiguity it then creates due to the above?

Barry Margolin
Thinking Machines Corp.

barmar@think.com
{uunet,harvard}!think!barmar