From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nala Ginrut Newsgroups: gmane.lisp.guile.devel Subject: Re: REPL reader of multi-language Date: Tue, 03 Jun 2014 14:36:41 +0800 Organization: HFG Message-ID: <1401777401.30925.19.camel@Renee-desktop.suse> References: <1401438340.26418.33.camel@Renee-desktop.suse> <8761kn3wz9.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1401777447 21487 80.91.229.3 (3 Jun 2014 06:37:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 3 Jun 2014 06:37:27 +0000 (UTC) Cc: guile-devel@gnu.org To: Ludovic =?ISO-8859-1?Q?Court=E8s?= Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Jun 03 08:37:20 2014 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 1WriLX-0006vl-62 for guile-devel@m.gmane.org; Tue, 03 Jun 2014 08:37:19 +0200 Original-Received: from localhost ([::1]:50596 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WriLW-00017r-M8 for guile-devel@m.gmane.org; Tue, 03 Jun 2014 02:37:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47044) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WriLJ-00016k-PV for guile-devel@gnu.org; Tue, 03 Jun 2014 02:37:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WriLA-0004tF-Oq for guile-devel@gnu.org; Tue, 03 Jun 2014 02:37:05 -0400 Original-Received: from mail-pb0-x22f.google.com ([2607:f8b0:400e:c01::22f]:38395) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WriL1-0004gF-6i; Tue, 03 Jun 2014 02:36:47 -0400 Original-Received: by mail-pb0-f47.google.com with SMTP id rp16so5074448pbb.34 for ; Mon, 02 Jun 2014 23:36:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:subject:from:to:cc:date:in-reply-to:references :organization:content-type:mime-version:content-transfer-encoding; bh=rdV+I5aPzwI9Ri3+ETgeS1yA3Foc1JHfqjLS+VZftNE=; b=FGOteJH6T0c0CfwEc/ovfMhUW+YosRAl6H0UkrCyHr8r9D6bIluSQ0FRWXaStwMSzI 4ctf/XTF1AG/HcGMDF1BRSit02JbP1KxtHHzOUTHS+EJLRDrJhJGxNbq1m+ka7l3Rqox Zbx2nBwJvJS0YJQ8AUfJka176SF/VQp+ofk1pM49GGdhg6+DXfWMZwqMqKpo6TPWCiyI hB3KlDfgFYWHVUZVjrkJpcQRpU4EjjKQqQGQZAd2drbmzjUJIWtXjKZCHfsPVMCNRasB NGvvccEWwooALaSIv3/bv1KvYwGt7ZcXRB88yq5+JlxQJguSvEaUwJ3ljJIb0gX3BG6h P1Zw== X-Received: by 10.68.189.137 with SMTP id gi9mr46885250pbc.79.1401777405715; Mon, 02 Jun 2014 23:36:45 -0700 (PDT) Original-Received: from [147.2.147.115] ([203.192.156.9]) by mx.google.com with ESMTPSA id jq6sm23818904pbb.76.2014.06.02.23.36.43 for (version=SSLv3 cipher=RC4-SHA bits=128/128); Mon, 02 Jun 2014 23:36:44 -0700 (PDT) In-Reply-To: <8761kn3wz9.fsf@gnu.org> X-Mailer: Evolution 3.4.4 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c01::22f 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:17181 Archived-At: Sorry for late reply, I was on my vocation. ;-) On Fri, 2014-05-30 at 21:08 +0200, Ludovic Courtès wrote: > Nala Ginrut skribis: > > > So here's my problem, there's only one reader slot defined in each > > language type ,say, in (system base language). I have to implement just > > one reader to fit them all: > > 1. If I provide the interactive reader in Guile, the reader becomes > > inefficient. Because each time users input `Enter', the source code > > typed so far will be detected in lalr-parser, and exception would be > > caught when the line doesn't complete a chunk, then the REPL returns > > continue prompt, say '...'. > > > > 2. If I provide compiler reader, people have to type semicolon or ctrl+d > > to see the result. > > Commit 65fa60 adjusted the REPL for multi-language support. In > particular that works fine with both Scheme/elisp and ECMAScript. > Yes, I saw it. It provided dependent `reader' for each language. Actually, my question was based on it. I requested adding `repl-reader', but now I don't think it's the best way. > What exactly is missing for Lua to be usable at the REPL? > After rethinking this issue, I think I need a method to detect if I'm under interactive environment(REPL) or not, then I can handle the reader properly. I found *repl-stack* maybe a way for that, I guess it'll be '() when I'm not in REPL. Can I rely on it? Thanks! > Ludo’. > >