From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.devel Subject: Re: how to implement mutual recursive parsers in syntax-parse Date: Mon, 21 May 2012 10:59:30 +0200 Message-ID: <87y5olzz7x.fsf@pobox.com> References: <87obppmgr8.fsf@pobox.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1337590800 8150 80.91.229.3 (21 May 2012 09:00:00 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 21 May 2012 09:00:00 +0000 (UTC) Cc: guile-devel To: Stefan Israelsson Tampe Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon May 21 10:59:57 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 1SWOT3-0004KP-KX for guile-devel@m.gmane.org; Mon, 21 May 2012 10:59:54 +0200 Original-Received: from localhost ([::1]:39447 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWOT3-0003wJ-7s for guile-devel@m.gmane.org; Mon, 21 May 2012 04:59:53 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:54963) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWOSz-0003wE-JG for guile-devel@gnu.org; Mon, 21 May 2012 04:59:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SWOSq-0005HA-Uu for guile-devel@gnu.org; Mon, 21 May 2012 04:59:49 -0400 Original-Received: from a-pb-sasl-sd.pobox.com ([74.115.168.62]:50735 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWOSq-0005Gk-Mr for guile-devel@gnu.org; Mon, 21 May 2012 04:59:40 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id C61129168; Mon, 21 May 2012 04:59:37 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; s=sasl; bh=92Z7tkoZj8KZ 5CpR9mBnoMJ+3nE=; b=AtyYq29VvZKAd4sXwt1mSf6k8qZ/1SUp0NSRdFJrkp7+ y6FlbAlQvWj10bzPXFCg9VMtivLMtrT6QWiqszW6ZcEY+xNbQd7NVj2Dhmgmkxfp jkz6jCPXWkcAsYW/QH7o+RmRWZq2km7KpcChxsf2qRIkZVcUl6zRapKI5sDJNKw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; q=dns; s=sasl; b=jUFZql 0gRD8fB9dYKEnjLgbOsrtqGZQ6QptwN0U+S60vsQrL9EknGbJhvOefhAWoCm9FQo J/nU5DJ+xJCyiJA1Qo5tH1Fm0Cs0YZ5sbwgRSokCdNOCB9YNvU9pC9HDXasK/sHa yspYtXfi7Wt178eP4oZKASkOWgN/vPdSH67C8= Original-Received: from a-pb-sasl-sd.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 9A28D9166; Mon, 21 May 2012 04:59:37 -0400 (EDT) Original-Received: from badger (unknown [85.50.196.132]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTPSA id 6001D9163; Mon, 21 May 2012 04:59:33 -0400 (EDT) In-Reply-To: (Stefan Israelsson Tampe's message of "Sat, 19 May 2012 00:05:43 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) X-Pobox-Relay-ID: 489E00F6-A323-11E1-B03B-E981AF15ED39-02397024!a-pb-sasl-sd.pobox.com X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 74.115.168.62 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:14495 Archived-At: On Sat 19 May 2012 00:05, Stefan Israelsson Tampe = writes: > =C2=A0(define (f x) (c)) > =C2=A0(define-syntax c (lambda (x) (pk 'c) #t)) These expressions are expanded in order, not together. To expand them together they need to be wrapped in a "begin". We can consider changing our toplevel expansion process to do something else, if there is a right thing. Andy --=20 http://wingolog.org/