guile-user
[Top][All Lists]
Advanced

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

Re: Nyacc question: where are the actions bound?


From: tomas
Subject: Re: Nyacc question: where are the actions bound?
Date: Mon, 3 Aug 2020 22:42:41 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

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

Attachment: signature.asc
Description: Digital signature


reply via email to

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