[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Nyacc question: where are the actions bound?

From: Matt Wette
Subject: Re: Nyacc question: where are the actions bound?
Date: Mon, 3 Aug 2020 16:37:27 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

On 8/3/20 1:42 PM, wrote:
On Thu, Jul 30, 2020 at 06:50:08AM -0700, Matt Wette wrote:
On 3/8/20 3:14 AM, wrote:

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 :)

  - t
Good to hear!  Thanks for the feedback.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]