Boost logo

Boost Users :

Subject: Re: [Boost-users] [Spirit 2] Questions related to generating grammars meta-dynamically
From: Joel de Guzman (joel_at_[hidden])
Date: 2010-11-30 23:18:07


On 12/1/2010 2:35 AM, Richard wrote:

> I played a little with Spirit V1 and am now getting back into Spirit
> V2. For what its worth, V2 is much easier to get going than V1 IMO.
>
> My advice is to take things one step at a time. Don't try to write a
> grammar that covers all the complexity of your input. Start with the
> simplest piece of the input and write a parser for that. Gradually
> add more rules to your grammar as you cover more complexity in the
> input.
>
> You can either develop the whole parsing bit first and then work on
> the semantic actions associated with each rule, or you can ping-pong
> back and forth between parsing and actions. I don't know which is
> better yet. I've been doing a little bit of both.

This is a very good advice! I'll have to steal that and put it
in the best practices page:

   http://boost-spirit.com/home/articles/doc-addendum/best-practices/

Regards,

-- 
Joel de Guzman
http://www.boostpro.com
http://spirit.sf.net

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net