Boost logo

Boost :

Subject: Re: [boost] Interest in a Boost.JSON library?
From: Joel de Guzman (joel_at_[hidden])
Date: 2008-12-22 23:33:57

Kirit Sælensminde wrote:
> Joel de Guzman wrote:
>> Kirit Sælensminde wrote:
>> I suggest porting the parser to Spirit2. It is so much faster and
>> flexible. Attribute handling of recursive types is built-in. Your
>> grammars will be a lot better and simpler.
> Sounds great. Is it part of Boost yet?

Yes. It's in beta, but a lot of folks are already using it.
The beta status is simply due to documentation. I do have
some tutorials here:

So far I've not done any
> optimisation (actually the only thing I think I want to do is to be able
> to parse directly from an istream and to print directly to an ostream).
> I've also not added in the error checking in the grammar so the error
> messages aren't very helpful -- it basically amounts to "unknown parse
> error".
> Should be holding off doing these things until I can use Spirit 2? I
> don't really want to do it twice.

I suggest using spirit2 now. Don't let the beta tag scare you.
The API is more or less stable. There will be some minor changes
here and there until we have release, but I can assure you that
such changes aill only be cosmetic.

>> I'll be accepting a set of (peer reviewed) reusable grammars as
>> part of Spirit2 distrib. I'd be interested in having a JSON
>> grammar. OvermindDL1's grammar is a good candidate. It would be
>> super if you both can iron out the details.
> I also have another couple of parsers that I've been working on that are
> nowhere near finished yet.

These are all cool candidates. My goal is to have a set of reusable
grammars people can use and learn from.

> The 3 members to a closure limit is killing me on that one though :)
> There's probably a smarter way of going about it.

No more closures in spirit2. You can consider that a relief, if
you don't know what I mean yet ;-)


Joel de Guzman

Boost list run by bdawes at, gregod at, cpdaniel at, john at