From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Israelsson Tampe Newsgroups: gmane.lisp.guile.devel Subject: bug in syntax-case in master Date: Wed, 16 May 2012 23:33:54 +0200 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=20cf301d42347195df04c02e13ca X-Trace: dough.gmane.org 1337204045 25298 80.91.229.3 (16 May 2012 21:34:05 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 16 May 2012 21:34:05 +0000 (UTC) To: guile-devel Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed May 16 23:34:04 2012 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SUlr7-00029S-Uo for guile-devel@m.gmane.org; Wed, 16 May 2012 23:34:02 +0200 Original-Received: from localhost ([::1]:37764 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SUlr7-0008S8-D0 for guile-devel@m.gmane.org; Wed, 16 May 2012 17:34:01 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:41493) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SUlr4-0008Rx-4m for guile-devel@gnu.org; Wed, 16 May 2012 17:33:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SUlr2-0001T7-Bd for guile-devel@gnu.org; Wed, 16 May 2012 17:33:57 -0400 Original-Received: from mail-yx0-f169.google.com ([209.85.213.169]:65168) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SUlr2-0001Sz-4f for guile-devel@gnu.org; Wed, 16 May 2012 17:33:56 -0400 Original-Received: by yenm7 with SMTP id m7so1459205yen.0 for ; Wed, 16 May 2012 14:33:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=Bu7qFGlPmAq2nEMcpl/ae2lYLwGpCKY9bQNwWz+2jiA=; b=d5IyAHLR8UiqXtZKHGmHYz3qsCAdC7FhSavQ+gLnWk05myMMtH1xnn9RPtBBZHvtLP yQ5wPkCroqmlzbLdTaT5yA8auI4gWy/Rx4u3HW00lK7ggSgihM3AUNcEqVm69faa3Drj jWFoAsFk1Be4hMOBagP2qmEQGCanZhB4TYon+2cwsaJSQJL3YZzAcIw5rpxTMHXrNWen XCn19fmgYwj75heIXFjZi5GsXP5PQBuNypFnmMxHFI2QD8cMEEsgPCyOo5AQ8BAgh212 514QHdRTajP7zHaWEk///nhibdiLPkDmBKpiHmPnqfhhkXiWq5XXJVD97nnhH3fUtWg+ zxjQ== Original-Received: by 10.42.11.142 with SMTP id u14mr2972201icu.18.1337204034082; Wed, 16 May 2012 14:33:54 -0700 (PDT) Original-Received: by 10.50.242.102 with HTTP; Wed, 16 May 2012 14:33:54 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.213.169 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:14481 Archived-At: --20cf301d42347195df04c02e13ca Content-Type: text/plain; charset=ISO-8859-1 I have found the bug, It was because of the bug fixed in master got a bug in my code visible! /Stefan ---------- Forwarded message ---------- From: Stefan Israelsson Tampe Date: Wed, May 16, 2012 at 8:57 PM Subject: bug in syntax-case in master To: guile-devel I'm trying to port syntax-parse to master. And get into the following trubble (syntax-case x (integrate) ((integrate a b) ...)) fails, but (syntax-case x (integrate) ((_ a b) ...)) does not fail looking at the code for syntax-case I would expect that the datum integrate is match against and not using syntax any syntactic information. In psyntax.scm around 2419 we have, ((bound-id-member? p keys) (values (vector 'free-id p) ids)) keys are the fixed datums, and (define bound-id-member? (lambda (x list) (and (not (null? list)) (or (bound-id=? x (car list)) (bound-id-member? x (cdr list)))))) e.g. no comparisons of the datum. Is this correct! I do understand that this can be a feature but is this expected? In syntax parse both options are possible. /Regards Stefan --20cf301d42347195df04c02e13ca Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I have found the bug, It was because of the bug fixed in
master got a bu= g in my code visible!

/Stefan

----= ------ Forwarded message ----------
From: = Stefan Israelsson Tampe <stefan.itampe@gmail.com>
Date: Wed, May 16, 2012 at 8:57 PM
Subject: bug in syntax-case in master=
To: guile-devel <guile-devel@= gnu.org>


I'm trying to port syntax-parse to master. A= nd get into the following trubble


(syntax-case x (integrate) ((integrate a b) ...))
fails, but
=
(syntax-case x (integrate) ((_ a b) ...))
does not fail


looking at the code for syntax-case I would expect that the datum i= ntegrate is
match against and not using syntax any syntactic information= .

In psyntax.scm around 2419 we have,
((bound-id-member? p keys)=
=A0(values (vector 'free-id p) ids))

keys are the fixed datums, = and

(define bound-id-member?
=A0=A0=A0=A0=A0 (lambda (x list)
= =A0=A0=A0=A0=A0=A0=A0 (and (not (null? list))
=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0 (or (bound-id=3D? x (car list))
=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 (bound-id-member? x (cdr list))))))

e.g. no comparisons of the datum.

Is this correct! I do understa= nd that this can be a feature but is this expected?
In syntax parse both= options are possible.

/Regards
Stefan






--20cf301d42347195df04c02e13ca--