From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Matt Wette Newsgroups: gmane.lisp.guile.user Subject: Re: Nyacc question: where are the actions bound? Date: Mon, 3 Aug 2020 16:37:27 -0700 Message-ID: <6b30ac6c-f825-940a-5872-d0dc6fd9c479@gmail.com> References: <20200308101445.GB28250@tuxteam.de> <20200803204241.GB5599@tuxteam.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26592"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Tue Aug 04 01:37:47 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 1k2k1a-0006pQ-AU for guile-user@m.gmane-mx.org; Tue, 04 Aug 2020 01:37:46 +0200 Original-Received: from localhost ([::1]:35350 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k2k1Z-0002Xb-DN for guile-user@m.gmane-mx.org; Mon, 03 Aug 2020 19:37:45 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48292) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k2k1M-0002XS-48 for guile-user@gnu.org; Mon, 03 Aug 2020 19:37:32 -0400 Original-Received: from mail-pj1-x102d.google.com ([2607:f8b0:4864:20::102d]:39912) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k2k1K-0000ar-IL for guile-user@gnu.org; Mon, 03 Aug 2020 19:37:31 -0400 Original-Received: by mail-pj1-x102d.google.com with SMTP id f9so984975pju.4 for ; Mon, 03 Aug 2020 16:37:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=nbLTIjJwHa8L9FZN5dap49dNViaGR6S7cZVs3dYKi4A=; b=STNYffcwj8+WmUb7VK/1cXWELEEojF8UB2cFPUbJ3DUi2zyheEh0WnA01DUL+9j6z2 wSPpfQDmeG4wtyO24lgxu72YxMNEtwIsVI4EcozNcsBYsp6oljM9V2cHv7CSmv3RJuN6 qj4DYmK/0jBxfva0DOdiJELNUuNSz89B3Hahf/YxyWZLAwu3ER4mU3DHLkSdFUusSAHY b3sZGpknSrHNu8S6p2ZUQspE6RtlqoWLOvq/23Eq0q+alSUZA2ulgapx1tfgnPtu0BBO XGdGax8qZqrctaXT57zOy86SZcyo6Fm1TRgWA5lIXX0fd7kqlEYZhx9dC47EClGRKOwQ i5lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=nbLTIjJwHa8L9FZN5dap49dNViaGR6S7cZVs3dYKi4A=; b=YeL/0IfpbBE/xmTY1lHWTpiT8HFFc4eeAy6BOsjgeoVAcXbjBNsizEpg7OBRTE/Ac7 7p8XwwRYVBMZbjn8FvMJ8QHllAyGRej7WPQO5desDfSNZehJAq9gzGVK2cysushMqiNT Z6dH94q9y19csqE7uuA8thkLN9UvxmJiqLGXpwJVsSDm4iRrS9j3bzlqFaEDIXWhVPWn t3xvN5Fc9DF9DW/7jGQ9v+c6vDbDJwVVjqGUlJ4q4iuaVgdgsTm+67STstA+99v+LKmU wsgo3xgmLV483aQp7UYQgRDeYKHrateiIMI41431/N91pm7urvWFRMVO7/tWKIXRETHz +peA== X-Gm-Message-State: AOAM532/F0Y3QLaPaIUI++JAwfdcItQrUM5TBEQ1smWxCIngp5T+PuaF UKL30P821jyE9EqVUeCNoHNFxgGuYPQ= X-Google-Smtp-Source: ABdhPJyvYyqsXU6Q18ebHH8kTyqYm3IPcthFytpGqlIZeUAD9cI9PEkOuLKq3Nejb6fkfW8zrsdqOg== X-Received: by 2002:a17:90a:2208:: with SMTP id c8mr1586516pje.123.1596497848418; Mon, 03 Aug 2020 16:37:28 -0700 (PDT) Original-Received: from [192.168.2.183] (64-52-176-132.championbroadband.com. [64.52.176.132]) by smtp.gmail.com with ESMTPSA id 80sm10282216pfy.147.2020.08.03.16.37.27 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 03 Aug 2020 16:37:27 -0700 (PDT) In-Reply-To: <20200803204241.GB5599@tuxteam.de> Content-Language: en-US Received-SPF: pass client-ip=2607:f8b0:4864:20::102d; envelope-from=matt.wette@gmail.com; helo=mail-pj1-x102d.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-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:16774 Archived-At: On 8/3/20 1:42 PM, tomas@tuxteam.de wrote: > 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 =collect= 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: >> >> (define (parse) >>  (let ((raw-parser (make-lalr-parser))) >>    (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 > > Add #:env option to specify module for evaluating parser actions > * module/nyacc/parse.scm (make-lalr-parser): add #env > (make-lalr-parser/num , /sym) use (current-module) as default > * test-suite/nyacc/lalr-01.test: add test case > > so thanks a lot for that). I'm a happy camper :) > > Cheers > - t Good to hear!  Thanks for the feedback. Matt