On Mon, May 03, 2004 at 09:02:02PM +0900, Robert Feldt wrote:
> Michael Neumann wrote:
> 
> >I am currently hacking a Packrat parser just for fun. I need to mix
> >values (like numbers, strings etc.) together with lazy values. I want to
> >make processing these values as transparent as possible.
> >
> > 
> >
> I guess this is beside the point but are you sure you really need an 
> explicit way to encapsulate lazy values to implement packrat parsing? I 
> did a packrat parser some time back but it was more like "memoize for 
> later"; maybe I didn't read the packrat papers enough... ;)

Hm, it's probably me who didn't read the papers enough :-)

> Can you comment on how you use the lazy values and how they help you 
> write the packrat parser? From my reading of the papers he presents it 
> in a lazy framework but you can unroll the laziness by memoization of 
> the partial results of a recursive decent parser.

I am currently using lazy values for actions that return semantic
values. But I am not sure whether I need this or not. I'll have to
rewrite it a bit... you can have a look at it soon (the sources are not
yet there, but I'll try to upload them this evening):

http://rubyforge.org/projects/packrat

What I am really looking for is a easy scannerless (I don't like tokens :-) 
parser generator for Ruby. I know your Rockit parser, but I've admit
that I didn't tried it too much as it seems to be a bit outdated.
Speed is not a big deal for me, just ease of use.

Regards,

  Michael