[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gcl-devel] Re: Backquote bug in GCL? Help and/or comment requested.
From: |
Camm Maguire |
Subject: |
[Gcl-devel] Re: Backquote bug in GCL? Help and/or comment requested. |
Date: |
15 Mar 2006 10:50:53 -0500 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
Greetings, and thanks!
Masami Hagiya <address@hidden> writes:
> From: Robert Boyer <address@hidden>
> Subject: Re: Backquote bug in GCL? Help and/or comment requested.
> Date: Wed, 15 Mar 2006 08:19:15 -0600
>
> > Dear Prof. Hagiya,
> >
> > Thanks very much for your quick reply, which I am ccing below. It turns out
> > the correct address for Guy Steele is now address@hidden
> >
> > Thanks for the backquote fix. It worked.
>
> Thank you very much for checking it.
>
> > A question. By analogy, should one also delete the immediately following
> > if,
> > in the NCONC case? Probably a stupid question.
>
> Yes. You are right.
>
> The old code almost always work.
> It transforms `(+ ,@x) into something like (cons '+ x).
> But for the example, it should transform `(+ ,@x) into (append '(+) x)
> in order to handle the internal ,@.
>
> It would be nice if the old code is used if ,@ is not nested.
>
How about this?
Index: backq.c
===================================================================
RCS file: /cvsroot/gcl/gcl/o/backq.c,v
retrieving revision 1.7
diff -u -r1.7 backq.c
--- backq.c 14 Oct 2005 22:41:24 -0000 1.7
+++ backq.c 15 Mar 2006 15:49:26 -0000
@@ -131,8 +131,11 @@
case APPEND:
if (vs_head == Cnil) {
- vs_popp;
- return(EVAL);
+ vs_popp;
+ if (!consp(vs_head) ||
+ vs_head->c.c_car!=siScomma_at)
+ return(EVAL);
+ vs_push(Cnil);
}
kwote_cdr();
make_list;
@@ -140,8 +143,11 @@
case NCONC:
if (vs_head == Cnil) {
- vs_popp;
- return(EVAL);
+ vs_popp;
+ if (!consp(vs_head) ||
+ vs_head->c.c_car!=siScomma_dot)
+ return(EVAL);
+ vs_push(Cnil);
}
kwote_cdr();
make_list;
Take care,
> -- Masami
>
> > Thanks a lot,
> >
> > Bob
> >
> > -------------------------------------------------------------------------------
> >
> > Date: Wed, 15 Mar 2006 23:06:45 +0900 (JST)
> > To: address@hidden
> > Cc: address@hidden, address@hidden, address@hidden,
> > address@hidden, address@hidden,
> > address@hidden
> > Subject: Re: Backquote bug in GCL? Help and/or comment requested.
> > From: Masami Hagiya <address@hidden>
> >
> > As I look over the code, the problem seems to be in the following
> > fragment beginning with the 132nd line of backq.c.
> >
> > case APPEND:
> > if (vs_head == Cnil) {
> > vs_popp;
> > return(EVAL);
> > }
> > kwote_cdr();
> > make_list;
> > return(APPEND);
> >
> > I guess removing the if statement will work...
> >
> > Sorry, I haven't checked it yet.
> >
> > -- Masami
> >
>
>
>
--
Camm Maguire address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens." -- Baha'u'llah
- [Gcl-devel] Re: Backquote bug in GCL? Help and/or comment requested.,
Camm Maguire <=