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: Re: rackets syntax parse Date: Sat, 4 Feb 2012 21:31:51 +0100 Message-ID: References: <874nviae6m.fsf@pobox.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=0015174c3792bd8c2804b82951dd X-Trace: dough.gmane.org 1328387518 10737 80.91.229.3 (4 Feb 2012 20:31:58 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 4 Feb 2012 20:31:58 +0000 (UTC) To: guile-devel Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sat Feb 04 21:31:58 2012 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RtmH7-0006PK-FL for guile-devel@m.gmane.org; Sat, 04 Feb 2012 21:31:57 +0100 Original-Received: from localhost ([::1]:37718 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RtmH6-00055y-Gr for guile-devel@m.gmane.org; Sat, 04 Feb 2012 15:31:56 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:35297) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RtmH3-00053P-Hm for guile-devel@gnu.org; Sat, 04 Feb 2012 15:31:54 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RtmH2-0001Bv-KI for guile-devel@gnu.org; Sat, 04 Feb 2012 15:31:53 -0500 Original-Received: from mail-ey0-f169.google.com ([209.85.215.169]:65311) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RtmH2-0001Bn-BY for guile-devel@gnu.org; Sat, 04 Feb 2012 15:31:52 -0500 Original-Received: by eaag11 with SMTP id g11so1922719eaa.0 for ; Sat, 04 Feb 2012 12:31:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=gIOvFWt1xh6f6pm/Co+m5C3C5N1dlFMyVVJyBFv/s54=; b=vMPuc1ibHIWUdITjJ35igM7meJFDDFMnXpi5iZffUN+26ZfW9TgT3Vj1fZvNCrFBEg aXHluadAUwQIdLugxlCeHqPX3xjVh3MG8jbNzheZf8OBBoSnPXCrNhp3CXkAIJg0pQ/N Yt3EmDLsSHOhFLiNNDUWlmAe3e9P/AvlOEWeo= Original-Received: by 10.213.15.17 with SMTP id i17mr1961920eba.103.1328387511388; Sat, 04 Feb 2012 12:31:51 -0800 (PST) Original-Received: by 10.213.105.141 with HTTP; Sat, 4 Feb 2012 12:31:51 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.215.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:13800 Archived-At: --0015174c3792bd8c2804b82951dd Content-Type: text/plain; charset=ISO-8859-1 Hi all, Things is going well with syntax parse and the part working is continuously increasing One question that I now struggeling is this. I have a macro expansion that looks like #'(begin (define f fkn-definition) (define-syntax name (make-syntax-case-transformer (make-stxclass ... (datum->syntax #'name 'f) ...)))) This code expans ok in the toplevel. But if expanded elsewhere in definition context f is not reached from the data associated with the macro. On the other hand if we used #'f in stead of (datum->syntax ...) it will work in the definitial context of for example a lambda but then it can happen that we loose the reference if expanded into toplevel. So how can I make this to work in both contexts? do I need to introduce e.g. with-syntaxclass ? Regards Stefan P.S. if anyone have a examples of syntax-parse usage please let me now. D.S. --0015174c3792bd8c2804b82951dd Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi all,

Things is going well with syntax parse and the part working = is continuously increasing

One question that I now struggeling is th= is.

I have a macro expansion that looks like

#'(begin
=A0=A0=A0=A0 (define f fkn-definition)
=A0=A0=A0=A0 (define-syntax name<= br>=A0=A0=A0=A0=A0=A0=A0=A0 (make-syntax-case-transformer
=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (make-stxclass
=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ...
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (datum->syntax #'name 'f)
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ...))))
This code expans ok in the toplevel. But if expanded elsewhere in definiti= on
context f is not reached from the data associated with the macro. On = the other
hand if we used #'f in stead of (datum->syntax ...)=A0 = it will work in the definitial context
of=A0 for example a lambda but then it can happen that we loose the referen= ce if expanded into
toplevel. So how can I make this to work in both con= texts? do I need to introduce
e.g. with-syntaxclass ?

Regards Stefan
=A0=A0=A0=A0
P.S. if anyone have a examples of syntax-parse u= sage please let me now. D.S.
--0015174c3792bd8c2804b82951dd--