Boost logo

Boost Users :

Subject: [Boost-users] Spirit 1.39 compilation times
From: Avi Bahra (avibahra_at_[hidden])
Date: 2009-07-21 05:01:23


>First, you should use Boost Trunk, it compiles quite noticeably faster.
>Second, look in the Spirit examples directly with Boost Trunk, in the
>QI subdirectory, the mini_c directory has an example of just that.

  I cant use use boost trunk, in order to get faster compiles, since I have
to use
 boost1.38/1.39. Also it looks like the grammar construction in the
examples
 is different. I looked for a similar example in boost 1.39 since we use
closures
 but none exists.

 Surely anyone who is using spirit and building on multiple platforms must
be
 be affected with this bug ?

  Best regards.
Avi

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Message: 4
Date: Mon, 20 Jul 2009 10:37:57 +0100
From: Avi Bahra <avibahra_at_[hidden]>
Subject: [Boost-users] Spirit 1.39 compilation times
To: boost-users_at_[hidden]
Message-ID:
       <af1b101f0907200237ofdf91bbk98be95d0ab817208_at_[hidden]>
Content-Type: text/plain; charset="iso-8859-1"

I am using boost spirit 1.39. On gcc the compilation times are acceptable.
However on AIX with v10.1 compiler, it fails to even compile. After 24hrs
waiting, I gave up.

Ok I realise that the grammer needs to split. Is there any _small_
examples out there, that demonstrates this technique for a beginner ?

In my case I have one grammer and ~70 rules.
Take the following rule:

        rule<ScannerT, string_closure::context_t> identifier ;
        identifier
               = lexeme_d [ (alnum_p || ch_p('_')) >> *(alnum_p ||
ch_p('_')) ]
                                [ identifier.name =
construct_<std::string>(arg1, arg2) ]
               ;

What is the technique for converting it into a grammer, that is separately
compiled ?

Also how would I reference it again, without including the header file, from
another rule

 dotPath
        = ( str_p(".")
>> +(
                                str_p("/")
>> identifier
                                )
           )
           [ dotPath.name = construct_<std::string>(arg1, arg2) ]
       ;

 Any help would greatly appreciated.

 Best regards,
Ta,
  Avi
-------------- next part --------------
HTML attachment scrubbed and removed

------------------------------

Message: 5
Date: Mon, 20 Jul 2009 04:21:23 -0600
From: OvermindDL1 <overminddl1_at_[hidden]>
Subject: Re: [Boost-users] Spirit 1.39 compilation times
To: boost-users_at_[hidden]
Message-ID:
       <3f49a9f40907200321x3effeaf2lb5a938b54a720226_at_[hidden]>
Content-Type: text/plain; charset=ISO-8859-1

On Mon, Jul 20, 2009 at 3:37 AM, Avi Bahra<avibahra_at_[hidden]> wrote:
> I am using boost spirit 1.39. On gcc the compilation times are acceptable.
> However on AIX with v10.1 compiler, it fails to even compile. After 24hrs
> waiting, I gave up.
>
> Ok I realise that the grammer needs to? split. Is there any _small_
> examples out there, that demonstrates this technique for a beginner ?
>
> In my case I have one grammer and ~70 rules.
> Take the following rule:
>
> ???????? rule<ScannerT, string_closure::context_t> identifier ;
> ???????? identifier
> ??????????????? = ??? lexeme_d?? [ (alnum_p || ch_p('_'))? >> *(alnum_p ||
> ch_p('_'))? ]
> ????????????????? ??? ?????????? [ identifier.name =
> construct_<std::string>(arg1, arg2) ]
> ??????????????? ;
>
> What is the technique for converting it into a grammer, that is separately
> compiled ?
>
> Also how would I reference it again, without including the header file,
from
> another rule
>
> ?dotPath
> ??? ??? ?= ??? (??? str_p(".")
> ??? ??? ??? ??? ??? ??? ?>> +(
> ??? ??? ??? ??? ??? ??? ??? ??? ?str_p("/")
> ??? ??? ??? ??? ??? ??? ??? ??? ?>> identifier
> ??? ??? ??? ??? ??? ???????????? )
> ??? ??? ??? )
> ??? ??? ??? [ dotPath.name = construct_<std::string>(arg1, arg2) ]
> ??? ??? ;
>
> ? Any help would greatly appreciated.

First, you should use Boost Trunk, it compiles quite noticeably faster.
Second, look in the Spirit examples directly with Boost Trunk, in the
QI subdirectory, the mini_c directory has an example of just that.

-- 
  Best regards,
Ta,
   Avi


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