From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.bugs Subject: bug#10132: Help lilypond interleave scheme and lilypond code in guile 2.x Date: Fri, 25 Nov 2011 15:26:00 +0100 Message-ID: <87lir4b7nr.fsf@pobox.com> References: <87vcq8bghp.fsf@pobox.com> <871uswqq8v.fsf@fencepost.gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1322231196 21782 80.91.229.12 (25 Nov 2011 14:26:36 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 25 Nov 2011 14:26:36 +0000 (UTC) Cc: ian@hulin.org.uk, 10132@debbugs.gnu.org To: David Kastrup Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Fri Nov 25 15:26:32 2011 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RTwjX-0005Gu-H4 for guile-bugs@m.gmane.org; Fri, 25 Nov 2011 15:26:31 +0100 Original-Received: from localhost ([::1]:44853 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RTwjX-0008Bq-11 for guile-bugs@m.gmane.org; Fri, 25 Nov 2011 09:26:31 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:46319) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RTwjU-0008AR-6H for bug-guile@gnu.org; Fri, 25 Nov 2011 09:26:29 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RTwjS-00011j-U4 for bug-guile@gnu.org; Fri, 25 Nov 2011 09:26:28 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:36648) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RTwjS-00011f-KE for bug-guile@gnu.org; Fri, 25 Nov 2011 09:26:26 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1RTwl0-0000Mk-IJ for bug-guile@gnu.org; Fri, 25 Nov 2011 09:28:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Andy Wingo Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-guile@gnu.org Resent-Date: Fri, 25 Nov 2011 14:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10132 X-GNU-PR-Package: guile X-GNU-PR-Keywords: X-Debbugs-Original-Cc: bug-guile , Ian Hulin Original-Received: via spool by submit@debbugs.gnu.org id=B.13222312751393 (code B ref -1); Fri, 25 Nov 2011 14:28:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 25 Nov 2011 14:27:55 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RTwks-0000MP-Md for submit@debbugs.gnu.org; Fri, 25 Nov 2011 09:27:55 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RTwkp-0000MH-74 for submit@debbugs.gnu.org; Fri, 25 Nov 2011 09:27:52 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RTwjE-000102-Nk for submit@debbugs.gnu.org; Fri, 25 Nov 2011 09:26:13 -0500 Original-Received: from lists.gnu.org ([140.186.70.17]:45978) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RTwjE-0000zv-M7 for submit@debbugs.gnu.org; Fri, 25 Nov 2011 09:26:12 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:46248) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RTwjD-00081O-4v for bug-guile@gnu.org; Fri, 25 Nov 2011 09:26:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RTwjC-0000z7-0m for bug-guile@gnu.org; Fri, 25 Nov 2011 09:26:11 -0500 Original-Received: from a-pb-sasl-sd.pobox.com ([74.115.168.62]:44250 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RTwjB-0000z3-SY; Fri, 25 Nov 2011 09:26:09 -0500 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 689167AD7; Fri, 25 Nov 2011 09:26:09 -0500 (EST) 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; s=sasl; bh=yuFDRgB0p4n0+WwvupfCpGwY29A=; b=Lj6Iqf 4NtQ7JHeUUaDSdsWvMFkPyPEhuK2Wel3QprxmE8AajJwObNSmYbH+uHPUHAZ60Ok +MGQJVJXtIA+kqdkpxAkX8ipUoo2Fc7QW9KwwAlUnZR/DMUyfgI03SSTMa6RiA4+ A6bR9u5UCBKmbq0LIDMd/lJO6YBBdxcayRX0U= 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; q=dns; s=sasl; b=EWcDAM+Jsge3/vjQoqPdUre5sZdKhavJ vOnjs4Eo6iPneSLpML2Njo9xhgM4DZLedD84NrXL9JavuQ1rAp0HUNPVLu8stW8e VC/e27dJFlnX3NGh2iDNjMMs+kk7149qlgCW28LkNhq0Sh5m9b+rD2jyhP0Bg+wO N5aJRRMHCr8= 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 5B08C7AD6; Fri, 25 Nov 2011 09:26:09 -0500 (EST) Original-Received: from badger (unknown [91.117.99.155]) (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 A36247AD5; Fri, 25 Nov 2011 09:26:08 -0500 (EST) In-Reply-To: <871uswqq8v.fsf@fencepost.gnu.org> (David Kastrup's message of "Fri, 25 Nov 2011 14:35:28 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) X-Pobox-Relay-ID: 6AC6D5BA-1771-11E1-9BCF-65B1DE995924-02397024!a-pb-sasl-sd.pobox.com X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Fri, 25 Nov 2011 09:28:02 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:5948 Archived-At: Hi, I am going to be away from the machine for the weekend, but before I headed out, I just wanted to put out one idea: On Fri 25 Nov 2011 14:35, David Kastrup writes: >> What do you use to parse the lilypond code? What does it parse to? > > Classical Bison/Flex parser/scanner. There is no "what does it parse > to" since the Bison rules execute the actions on the fly: it is a > classical interpreter. With a number of lexical and semantical tie-ins, > it would be non-trivial to actually create an intermediate > representation. Have you considered using silex or some other tokenizer in scheme, combined with the lalr parser from (system base lalr)? See "LALR(1) Parsing" in the manual for Guile 2.0. > The procedure-environment approach was elegant and minimally complex. > The question is how feasible it is for the Guile compiler to capture an > environment in a form that can be used even after compilation. Like > taking the address of a variable in C, the export of such an environment > interferes with a number of static optimizations. For our particular > application, readonly access to the symbols in the environment should be > quite sufficient, but of course I can't vouch for other potential uses. If this is the answer, then we can figure out a way to implement it in Guile 2.0.x as well. But if you are amenable to it, implementing the parser in Scheme would be another attractive option -- though, it would be a change, and that has costs. Cheers, Andy -- http://wingolog.org/