Subject: Re: I don't understand Lisp
From: rpw3@rigden.engr.sgi.com (Rob Warnock)
Date: 1998/09/14
Newsgroups: comp.lang.lisp
Message-ID: <6tijs5$2n0of@fido.engr.sgi.com>
Jeffrey Mark Siskind  <Qobi@research.nj.nec.com> wrote:
+---------------
| > but in practice I don't know of a single Scheme implementation
| > that does *NOT* use the same lexer for the user-visible READ procedure and
| > the reader buried in the LOAD procedure and the top-level REPL.
| 
| Stalin uses different code to implement READ and to read in the sourc
| program. When the source program is read in, the reader keeps track of
| source file name, line, and character positions to include in error messages.
+---------------

Yes, well, o.k., I misspoke (or perhaps wasn't specific enough).  Yes, I
know of other Scheme readers (well, at least one) which annotate the source
similarly (e.g., the one in the Rice PLT group's "MrSpidey"). But what I was
referring to is that the user-visible READ *does* accept all legal source
programs, so that Erik's distinction between "prgrams defined by lexical
rules" and "programs defined by S-exprs" is, for all practical purposes, moot.

Now it is certainly the case that one could make a *mistake* in defining a
Lisp (or Scheme) by its lexical representation in such a way that there was
*not* a guarantee of equivalency, but I also suspect that most participants
in this group would consider such a definition badly broken (if only because
of the negative implications on macros).

+---------------
| READ does not do this. In fact, the source program reader doesn't produce
| a typical S expression. Rather it produces a structure of type S-EXPRESSION
| which includes the encapsulated file, line, and character position.
+---------------

Call me naive, but I don't see how this affects the issue... unless there
are files which Stalin [or some other Lisp or Scheme] will accept as programs
which its READ *won't* accept when a user program tries to read them (e.g.,
say, allowing allows "#+<sym>" or "#.<exp>" in "programs" but not in files
parsed with READ). And if there are, I'd call it broken.


-Rob

[p.s. Apologies in advance: Replies to this via email may get a
"vacation" bounce messages while I'm on sabbatical from SGI...]

-----
Rob Warnock, 8L-855		rpw3@sgi.com
Applied Networking		http://reality.sgi.com/rpw3/
Silicon Graphics, Inc.		Phone: 650-933-1673
2011 N. Shoreline Blvd.		FAX: 650-964-0811
Mountain View, CA  94043	PP-ASEL-IA