From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Newsgroups: gmane.lisp.guile.user Subject: Re: Nyacc question: where are the actions bound? Date: Mon, 3 Aug 2020 22:42:41 +0200 Message-ID: <20200803204241.GB5599@tuxteam.de> References: <20200308101445.GB28250@tuxteam.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="GID0FwUMdk1T2AWN" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33873"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/1.5.21 (2010-09-15) To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Mon Aug 03 22:42:58 2020 Return-path: Envelope-to: guile-user@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k2hIP-0008fR-MZ for guile-user@m.gmane-mx.org; Mon, 03 Aug 2020 22:42:57 +0200 Original-Received: from localhost ([::1]:34346 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k2hIO-0000Pq-Ew for guile-user@m.gmane-mx.org; Mon, 03 Aug 2020 16:42:56 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58890) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k2hIE-0000Pj-SF for guile-user@gnu.org; Mon, 03 Aug 2020 16:42:47 -0400 Original-Received: from mail.tuxteam.de ([5.199.139.25]:60976) by eggs.gnu.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.90_1) (envelope-from ) id 1k2hIC-0004Oy-No for guile-user@gnu.org; Mon, 03 Aug 2020 16:42:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tuxteam.de; s=mail; h=From:In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:To:Date; bh=BtcskmhoHuTJ3W0IGPhQ8AVVp/cazFA9NxNFw1kaxow=; b=n0Brlr0L9OqcNFomFysGWSUGuJqGvRzXa8NuPFf6MyY4YBRXvZnguid2VxWBWmRVA6Tr+1T3jN8zzvfAd4rAk0LVWPNYC7VVe6BOrE04498fFvhmPSFiz44DqK1RCjY11qIXdwptCWBD7kqlkS7heCvNqi5Bkx1MWuDnZc9JDyYZQsrztta827xjy1XOXVaovlvt4WUHbBTK0nlI/lIfgMEMl0vhtks1Ov/D1SCxeiRoPgH3caplkS8FogpMFHE99lZx1C9O/yLx/61Qx6gBoI1ERVuFX2NzUP8tg7N91HW0reqT5M6HHxS4g4YrBCjR80EhkndqthlOEp42sDkv9g==; Original-Received: from tomas by mail.tuxteam.de with local (Exim 4.80) (envelope-from ) id 1k2hI9-00020o-TH for guile-user@gnu.org; Mon, 03 Aug 2020 22:42:41 +0200 Content-Disposition: inline In-Reply-To: Received-SPF: pass client-ip=5.199.139.25; envelope-from=tomas@tuxteam.de; helo=mail.tuxteam.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/03 16:42:42 X-ACL-Warn: Detected OS = Linux 3.1-3.10 [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.io gmane.lisp.guile.user:16772 Archived-At: --GID0FwUMdk1T2AWN Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jul 30, 2020 at 06:50:08AM -0700, Matt Wette wrote: > On 3/8/20 3:14 AM, tomas@tuxteam.de wrote: > >Hi, > > > >I'm playing around with Nyacc: I found a first little use case [...] > >So I defined some function =3Dcollect=3D which will be called from > >actions in the grammar. > > > >My question is: where is the stuff resolved which is mentioned > >in grammar actions? [...] > Hi Tomas, (I apologize for the ascii spelling) > You may be able to do what you want with the following: >=20 > (define (parse) > =C2=A0(let ((raw-parser (make-lalr-parser))) > =C2=A0=C2=A0 (raw-parser (gen-lexer)))) OK, got it now. It doesn't actually address my problem above, but you answered my question above anyway, and even made the environment more flexible (that was the commit: commit 9f45ea29bfc22e53cf08c27a6fb9d2de581b2092 Author: Matt Wette Date: Mon Mar 23 17:38:30 2020 -0700 Author: Matt Wette Date: Mar 23, 2020 =20 Add #:env option to specify module for evaluating parser acti= ons * module/nyacc/parse.scm (make-lalr-parser): add #env (make-lalr-parser/num , /sym) use (current-module) as defau= lt * test-suite/nyacc/lalr-01.test: add test case so thanks a lot for that). I'm a happy camper :) Cheers - t --GID0FwUMdk1T2AWN Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAl8odsEACgkQBcgs9XrR2kaOygCfc6f49m8agJK2pxYk+wPmTimP UEsAn2bwUmQOjHeYXQt926AGzJKsYX2V =nViP -----END PGP SIGNATURE----- --GID0FwUMdk1T2AWN--