unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Matt Wette <matt.wette@gmail.com>
To: guile-user@gnu.org
Subject: Re: Nyacc question: where are the actions bound?
Date: Mon, 3 Aug 2020 16:37:27 -0700	[thread overview]
Message-ID: <6b30ac6c-f825-940a-5872-d0dc6fd9c479@gmail.com> (raw)
In-Reply-To: <20200803204241.GB5599@tuxteam.de>

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 <mwette@alumni.caltech.edu>
>    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




      reply	other threads:[~2020-08-03 23:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-08 10:14 Nyacc question: where are the actions bound? tomas
2020-03-08 15:10 ` Matt Wette
2020-03-09  9:07   ` tomas
2020-03-14 11:59   ` Nyacc question: [found] " tomas
2020-03-14 14:31     ` Matt Wette
2020-03-14 15:47       ` tomas
2020-07-30 13:50 ` Nyacc question: " Matt Wette
2020-07-30 17:17   ` tomas
2020-08-03 20:42   ` tomas
2020-08-03 23:37     ` Matt Wette [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6b30ac6c-f825-940a-5872-d0dc6fd9c479@gmail.com \
    --to=matt.wette@gmail.com \
    --cc=guile-user@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).