chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] Mutual recursion w/ comparse


From: Matt Gushee
Subject: Re: [Chicken-users] Mutual recursion w/ comparse
Date: Fri, 29 May 2015 18:07:41 -0600

Hi, Moritz--

On Fri, May 29, 2015 at 3:00 AM, Moritz Heidkamp <address@hidden> wrote:
 
> I also saw that comparse provides a similar macro called
> 'recursive-parser', but for some reason that didn't work when I tried it.
> Maybe I was using it wrong.

That's right -- it's slightly more efficient than your version as it
memoizes the wrapped parser so that it only needs to be constructed the
first time it is used.

If you are on Comparse 0.2.2 you would define your parser just like
before, wrapped in `recursive-parser', i.e. the interface should be
identical to your `mrp'. The interface used to be different before
Comparse 0.2.2.

That was the problem. It turned out I had 0.1.0 installed on this machine. I updated comparse, and all is well! Thank you.

Matt

reply via email to

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