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: problem with trailing comment in repl Date: Sat, 12 Feb 2011 15:36:00 +0100 Message-ID: References: <87r5beb7dg.fsf@gnu.org> <8739ntbd8a.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1297521079 13432 80.91.229.12 (12 Feb 2011 14:31:19 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 12 Feb 2011 14:31:19 +0000 (UTC) Cc: guile-devel@gnu.org To: "Jose A. Ortega Ruiz" Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sat Feb 12 15:31:14 2011 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PoGVD-0004gY-9Z for guile-devel@m.gmane.org; Sat, 12 Feb 2011 15:31:14 +0100 Original-Received: from localhost ([127.0.0.1]:50293 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PoGV9-0003LE-UA for guile-devel@m.gmane.org; Sat, 12 Feb 2011 09:31:07 -0500 Original-Received: from [140.186.70.92] (port=40974 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PoGV4-0003IF-E9 for guile-devel@gnu.org; Sat, 12 Feb 2011 09:31:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PoGUw-0001yv-Rx for guile-devel@gnu.org; Sat, 12 Feb 2011 09:30:56 -0500 Original-Received: from a-pb-sasl-sd.pobox.com ([64.74.157.62]:41008 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PoGUw-0001yp-Oe; Sat, 12 Feb 2011 09:30:54 -0500 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 02DBC3FEF; Sat, 12 Feb 2011 09:31:56 -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=O0xiYDfrP1BlYInU7g3JnmP8GxQ=; b=Lq9AXq gDmKUG7OX6gYFvkbjdrNT73j8mOx2emrLAUjyhdxShbC1zukAXQfaM8EO9XsoMYC X/1lTHrnhMyWYKFvgKUu++nY7v7kUEPcgghHDvWYjcSI0FUqnFlG/LVzhDWhHSPG Lf6jKbFyq66ZQjeyFLE92t4iH7LA1inU2A+Ks= 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=kZ9U724sHkdmPGcKkQUR7BTngNDYhTLS tl7ZIne9MeZtBMWT8f9E1VfCCpTikOcxfXReLUyp31nJWAr2l8YmAvATrVxoWu73 jRk8wOsBfHPkfCPBz78uAV1Isl8PYxdevrIHAen8SPnRp9zQC6h+Yn/Zg1mbS+F0 LI1mksHvPS0= 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 E44D93FEE; Sat, 12 Feb 2011 09:31:54 -0500 (EST) Original-Received: from unquote.localdomain (unknown [90.164.198.39]) (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 44C383FED; Sat, 12 Feb 2011 09:31:52 -0500 (EST) In-Reply-To: <8739ntbd8a.fsf@gnu.org> (Jose A. Ortega Ruiz's message of "Sat, 12 Feb 2011 14:21:09 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) X-Pobox-Relay-ID: D6EC692E-36B4-11E0-A49E-AF401E47CF6F-02397024!a-pb-sasl-sd.pobox.com X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 64.74.157.62 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:11574 Archived-At: On Sat 12 Feb 2011 14:21, "Jose A. Ortega Ruiz" writes: > I'm not sure i understand this reasoning, because when there are two (or > more) complete sexps in a line they're accepted, and a new prompt > appears; Of course. 1. Guile: No input available, print prompt: guile> 2. User: one line of input: (exp-1) (exp-2) 3. Guile: read one sexp 4. Guile: flush whitespace; input state is: (exp-2) 5. Guile: Input is ready, so don't print prompt, just read 6. Guile: Flush whitespace, no input available, so print prompt: guile > i was expecting a comment to be equivalent to whitespace. We could add some hacks in that regard, but it wouldn't work for ecmascript... If there is input, Guile calls `read', not some hypothetical `read-syntax' that could return a comment, and `read' doesn't return until it has read an entire expression. > However, i think there's a problem with metacommands at the > "non-prompt": > > scheme@(guile-user)> ;; foo > ,error > While compiling expression: > Syntax error: Meta-commands have to be the first thing on the prompt. It's a special case to look for the comma character; once we've seen non-whitespace -- ";" in this case -- we're in the scheme reader, not the repl reader. Regards, Andy -- http://wingolog.org/