Subject: [clisp-list] reader: small inconsistency with commas.

From: Pascal J.Bourguignon <[email-masked]>
Date: Tue Jul 27 00:11:00 2004

$ /usr/local/bin/clisp -ansi -q -norc

    [1]> 1 2
    1
    [2]> 
    2
    [3]> 1 , 2
    1
    [4]> 
    *** - READ: comma is illegal outside of backquote
    Break 1 [5]> 
    [6]> 1, 2
    1
    [7]> 
    *** - READ: comma is illegal outside of backquote
    Break 1 [8]> 
    [9]> 1,
    1

Oops! No error detected here...
    
    [10]> (lisp-implementation-version)
    "2.33.1 (2004-05-22) (built 3297451256) (memory 3297451552)"
    [11]> 

    [11]> 1,2
    1
    [12]> 
    *** - READ: comma is illegal outside of backquote
    Break 1 [13]> 

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

There is no worse tyranny than to force a man to pay for what he does not
want merely because you think it would be good for him. -- Robert Heinlein

---

From: Sam Steingold <[email-masked]>
Date: Tue Jul 27 10:05:05 2004

> * Pascal J.Bourguignon <[email-masked]> [2004-07-27 09:09:54 +0200]:
>
>     [9]> 1,
>     1
>
>     [11]> 1 ,

this boils down to the fact that in CLISP

(let ((cs (make-concatenated-stream (make-string-input-stream "a"))))
  (unread-char (read-char cs) cs)
  (eql (peek-char nil cs)
       (peek-char nil (first (concatenated-stream-streams cs)) nil nil)))

returns NIL (while in CMUCL and LWW it return T, even though I see no
indication in ANSI that this is required).

-- 
Sam Steingold (http://www.podval.org/~sds) running w2k
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.honestreporting.com>
The only substitute for good manners is fast reflexes.

---

From: Pascal J.Bourguignon <[email-masked]>
Date: Tue Jul 27 10:38:02 2004

> indication in ANSI that this is required).

But I did not get the impression that the reader algorithm described in 
www.lispworks.com/reference/HyperSpec/Body/02_b.htm
makes any references to peek-char and unread-char...

In any case, this is a low priority item.

---

From: Pascal J.Bourguignon <[email-masked]>
Date: Tue Jul 27 10:40:17 2004

>makes any references to peek-char and unread-char...

Oops, even if I read it lately, I still have to reread it several
times. It indeed refers to UNREAD-CHAR...  Sorry.