On Feb 5, 2008, at 5:27 PM, Eric Mahurin wrote:

> I figured that part out, but there  were some significant bugs in the
> ghostwheel grammar spec:
> * was using ";" instead of "," between key:value pairs
> * \b was converted to \n
> * not handling number with exponent and fractional part
>
> I fixed those, but it still has a bug where it sometimes spits out  
> arrays
> where an object/hash should be.  I'm just skipped the self-checking  
> in my
> benchmark to get some results.

Oops.  ;)

Thanks for figuring most of it out.

> Notice that there isn't much advantage to use a parser generator in  
> this
> case.  Since JSON is relatively simple, you don't save much (or any)  
> coding by using a parser generator.

Right.  One of the main points of recursive descent parsing is that it  
is supposed to be easy to hand roll.  For many cases, you really don't  
need the parser generator to hold your hand.  Of course, Treetop adds  
the nice memoization and whatnot.  Tradeoffs.

James Edward Gray II