[Ecls-list] Patch: typos in compiler messages

Josh Elsasser josh at elsasser.org
Mon Sep 1 22:09:16 UTC 2008


On Mon, Sep 01, 2008 at 07:29:50PM +0200, Juan Jose Garcia-Ripoll wrote:
> On Mon, Sep 1, 2008 at 7:04 PM, Juan Jose Garcia-Ripoll
> <juanjose.garciaripoll at googlemail.com> wrote:
> > Or do you mean something like
> > (progn (print '#1=(1 2)) '#.(print '#1#))

Yes, that is the case I had in mind. Sorry again for not including an
example.

> > Is it clear that the recursive elements can be defined outside the #.
> > reader macro
> 
> Ok, I answered my own question. The following
>  (with-output-to-string (*standard-output*)
>       (let ((*print-circle* t))
> 	(read-from-string "'#.(princ (list '#1=(1 2) '#1#))")))
> should output
>   "(#1=(1 2) #1#)"
> but it currently prints an unprocessed form.
> 
> In my opinion the proper fix is to use a nonrecursive call to READ, so
> that the form read by #. has its own sharp-eq/sharp-sharp context. The
> fix is just replacing ecl_read_object with
> ecl_read_object_non_recursive and seems to work.

I'm not sure that this is right.  The hyperspec says "The scope of the
label is the expression being read by the outermost call to read".
The term "outermost call" implies to me that recursive reads should
use the same context.

http://www.lispworks.com/documentation/HyperSpec/Body/02_dho.htm




More information about the ecl-devel mailing list