Boost logo

Boost Users :

Subject: Re: [Boost-users] [Spirit] Problem with fairly big grammar
From: Joel de Guzman (joel_at_[hidden])
Date: 2009-11-07 18:29:10


HT4N - wrote:
>
> Rename the subject.
>
> What is the suggested practice if you have a fairly big grammar which
> you split into many header files ?
>
> To repeat my problem, I have fairly big grammar and the compiler throws
> me the following error (for debug build). Retail build is fine. Usig
> /bigobj does not fix the debug build.
>
> *> > "boost\spirit\core\non_terminal\impl\rule.ipp(173) : error C1128:
> number
> > > of sections exceeded object file format limit : compile with /bigobj"

I highly suggest moving to spirit2 if you are planning to do any
refactorization. In spirit2 (http://spirit.sourceforge.net/home/)
we have some examples that highlight this:

calc6, calc7 and mini_c are examples of modular grammar constructions.
calc6 is simplest of the three and shows how you can:

1) embed grammars for modularization
2) separate the grammar definition (constructor) from the class declaration
3) instantiate a particular grammar template in a cpp file.

Regards,

-- 
Joel de Guzman
http://www.boostpro.com
http://spirit.sf.net
http://www.facebook.com/djowel
Meet me at BoostCon
http://www.boostcon.com/home
http://www.facebook.com/boostcon

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