From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludovic.courtes@laas.fr (Ludovic =?iso-8859-1?Q?Court=E8s?=) Newsgroups: gmane.lisp.guile.devel Subject: Re: [PATCH] Per-module reader, take #3 Date: Mon, 21 Nov 2005 13:55:30 +0100 Organization: LAAS-CNRS Message-ID: <87ek5anosd.fsf@laas.fr> References: <87u0gp9lm3.fsf@laas.fr> <877jd3lkdq.fsf@ossau.uklinux.net> <87hdc62a6c.fsf@laas.fr> <87irw49twc.fsf@laas.fr> <87irw3prgp.fsf@ossau.uklinux.net> <8764rw7b9q.fsf_-_@laas.fr> <871x2j98qb.fsf@ossau.uklinux.net> <87u0ffnudk.fsf@laas.fr> <87sluxb0xt.fsf@ossau.uklinux.net> <87r7agvdb1.fsf@laas.fr> <87wtk796xk.fsf@ossau.uklinux.net> <87br1jiacq.fsf@laas.fr> <87d5lp9vv4.fsf@ossau.uklinux.net> <871x258dxd.fsf@zip.com.au> <87zmos8zt4.fsf@ossau.uklinux.net> <87ll0a3hlk.fsf@ossau.uklinux.net> <87pspch28a.fsf_-_@laas.fr> <87zmo4jny6.fsf@ossau.uklinux.net> <87acg0maxs.fsf@zagadka.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1132588848 6015 80.91.229.2 (21 Nov 2005 16:00:48 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 21 Nov 2005 16:00:48 +0000 (UTC) Cc: guile-devel@gnu.org, Neil Jerram Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Nov 21 17:00:44 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EeE0m-00041g-9r for guile-devel@m.gmane.org; Mon, 21 Nov 2005 16:55:20 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EeE0l-0003z6-P9 for guile-devel@m.gmane.org; Mon, 21 Nov 2005 10:55:19 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EeBqm-0002XU-Rk for guile-devel@gnu.org; Mon, 21 Nov 2005 08:36:53 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EeBpJ-0001zd-Kb for guile-devel@gnu.org; Mon, 21 Nov 2005 08:35:25 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EeBD2-0003yo-HE for guile-devel@gnu.org; Mon, 21 Nov 2005 07:55:48 -0500 Original-Received: from [140.93.0.15] (helo=laas.laas.fr) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1EeBD1-0004Hz-3O for guile-devel@gnu.org; Mon, 21 Nov 2005 07:55:48 -0500 Original-Received: by laas.laas.fr (8.13.1/8.13.4) with SMTP id jALCtWLT012000; Mon, 21 Nov 2005 13:55:37 +0100 (CET) Original-To: Marius Vollmer X-URL: http://www.laas.fr/~lcourtes/ X-Revolutionary-Date: 1 Frimaire an 214 de la =?iso-8859-1?Q?R=E9volution?= X-PGP-Key-ID: 0xEB1F5364 X-PGP-Key: http://www.laas.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 821D 815D 902A 7EAB 5CEE D120 7FBA 3D4F EB1F 5364 X-OS: powerpc-unknown-linux-gnu Mail-Followup-To: Marius Vollmer , Neil Jerram , guile-devel@gnu.org In-Reply-To: <87acg0maxs.fsf@zagadka.de> (Marius Vollmer's message of "20 Nov 2005 02:15:27 +0200") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux) X-Spam-Score: 0 () X-Scanned-By: MIMEDefang at CNRS-LAAS X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:5417 Archived-At: Hi Marius, Marius Vollmer writes: > Hmm. Your approach make 'load' configurable so that it can use > different 'read' procedures. Wouldn't it be more natural to make > 'read' configurable to parse different syntaxes? [...] > However, making the read procedure used by 'load' configurable can't > hurt, I think. Indeed. In fact, this change is two-fold: 1. Have `primitive-load' refer to the `*current-reader*'[*] fluid instead of hard-wiring calls to `scm_read ()'. This way, a Scheme file being loaded can change its reader on-the-fly by doing: (fluid-set! *current-reader* ...) This allows a module to use a different syntax variant, for instance. 2. There are several functions that build upon `primitive-load'. Neil identified them and proposed a way to cleanly integrate them with our modified `primitive-load' while still keeping the "primitiveness" or `primitive-load': http://lists.gnu.org/archive/html/guile-devel/2005-10/msg00116.html Since those `load' procedures are written in Scheme, we can harmlessly have them take an optional `read' argument. Hope this helps, Ludovic. [*] It occurred to me that Neil named the fluid `current-reader' but I think it should really be `*current-reader*' in order to stick to the conventions. _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel