TasteCurry Bug

From: Sven Panne <Sven.Panne_at_informatik.uni-muenchen.de>
Date: Mon, 09 Feb 1998 09:44:36 +0100

The new version of TasteCurry (23/01/98) has a small bug in the
Scheme-code of its parser: Numbers are compared with eq? instead of
eqv?/equal?. Symptom in vscm: car of #f. This is easily fixed:

---------------------------------------------------------------------------
*** parser/pp.~1~ Fri Jan 30 15:15:28 1998
--- parser/pp Fri Feb 6 12:05:10 1998
***************
*** 448,454 ****
    (cond ((null? table) (display "*** constructor ") (write cnr)
                         (display " not found!") (newline))
          ((eq? (caar table) 'constructordeclaration)
! (cond ((eq? (cadr (cadar table)) cnr) (car (cdddar table)))
                    (else (lookup-cons cnr (cdr table)))))
          (else (lookup-cons cnr (cdr table)))))
  
--- 448,454 ----
    (cond ((null? table) (display "*** constructor ") (write cnr)
                         (display " not found!") (newline))
          ((eq? (caar table) 'constructordeclaration)
! (cond ((equal? (cadr (cadar table)) cnr) (car (cdddar table)))
                    (else (lookup-cons cnr (cdr table)))))
          (else (lookup-cons cnr (cdr table)))))
   
---------------------------------------------------------------------------

I'm not sure if this is the only place where a fix is neccessary.
If a Scheme programm never needs identity, only equality, using always
equal? is much safer.

-- 
Sven Panne                                        Tel.: +49/89/2178-2235
LMU, Institut fuer Informatik                     FAX : +49/89/2178-2211
LFE Programmier- und Modellierungssprachen              Oettingenstr. 67
mailto:sven.panne_at_informatik.uni-muenchen.de            D-80538 Muenchen
http://www.pms.informatik.uni-muenchen.de/mitarbeiter/panne
Received on Mo Feb 09 1998 - 09:42:00 CET

This archive was generated by hypermail 2.3.0 : Do Feb 01 2024 - 07:15:05 CET