Boost logo

Boost Users :

Subject: Re: [Boost-users] [Spirit 2] Questions related to generating grammars meta-dynamically
From: Richard (legalize+jeeves_at_[hidden])
Date: 2010-12-03 14:35:17


[Please do not mail me a copy of your followup]

boost-users_at_[hidden] spake the secret code
<4CF652D3.7090008_at_[hidden]> thusly:

>> 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.
>
>Well, in my case the input is relatively simple (JSON), it's the
>interpretation of the target types that complicates things... but your
>point about the incremental approach is certainly taken :-)

Additionally, if you practice test-driven development, then as you
incrementally refine your grammar you'll know that the complexity
you're adding doesn't break the simple cases you already have working.

-- 
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
 <http://legalizeadulthood.wordpress.com/the-direct3d-graphics-pipeline/>
      Legalize Adulthood! <http://legalizeadulthood.wordpress.com>

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