[Ecls-list] Patch: typos in compiler messages

Juan Jose Garcia-Ripoll juanjose.garciaripoll at googlemail.com
Mon Sep 1 17:29:50 UTC 2008


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#))
>
> 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.

Furthermore, contrary to SBCL and CLISP, with this fix reading the
following form does not crash the lisp
#1=(print #.(print #1#))

Would you agree with the fix?

Juanjo

-- 
Instituto de Física Fundamental
CSIC, Serrano, 113, Madrid 28040 (Spain)
http://juanjose.garciaripoll.googlepages.com


More information about the ecl-devel mailing list