Boost logo

Boost :

From: Nicola Musatti (Nicola.Musatti_at_[hidden])
Date: 2007-01-27 18:13:51


Vladimir Prus wrote:
> Nicola Musatti wrote:
>> Roland Schwarz wrote:
[...]
>> In contrast the Spirit-Only distribution contains just
>> /boost/boost/spirit.hpp
>> /boost/boost/spirit/
>> /boost/libs/spirit/
>
> Is this "Spirit-Only" distribution available anywhere?

http://tinyurl.com/qna5h

>> I see three alternatives now:
>> - I post my patched Spirit-Only somewhere, but I don't have an ftp site
>> available;
>> - You download Spirit-Only from the Spirit only site and patch it;
>> - You remove the unnecessary directory and files from what you already
>> have;
>>
>> I'm attaching the Python script I used to patch my distribution, in case
>> you chose the second option.
>
> I don't see any attachments, did you forget it?

Oops, sorry.

>> I'm sorry about all this. I set up my environment almost a year ago and
>> forgot everything about it.
>
> Let me clarify -- does it means that no release of Spirit is known
> to work with 1.34 RC state of serialization and borland compiler?

It depends on how you plan to do it. If you replace Spirit within the
Boost source tree, then version 1.6.3 does work. However this isn't a
viable approach for regression tests. Unfortunately Spirit 1.6.3
requires my patch in order to be usable with Borland from outside the
Boost source tree.

> Then, maybe we should not spend much more time getting serialization tests
> to work with borland, because even if you or Roland succeed in making all tests
> green, then users might think everything is OK, while in practice they should
> follow non-trivial procedure to get it to work.

My plan is to issue Spirit 1.6.4 specifically for this reason; with
Roland's patch using serialization with Borland is going to be much
easier. Still, I wouldn't want 1.34 to be further delayed just for this
reason.

Unfortunately, what with the shift to BBv2 and the false positives in
the regression tests I didn't realize what was going on until recently.

Cheers,
Nicola Musatti

import os, re

baseDir = "D:\\src\\boost\\boost\\spirit"
inclRe = re.compile(R"^(\s*#\s*include\s*)\"(boost.*)\"(\s*)$")

extensions = ( ".cpp", ".hpp", ".ipp" )
for path, dirs, files in os.walk(baseDir) :
    for fn in files :
        e = os.path.splitext(fn)[1]
        if e in extensions :
            p = os.path.join(path,fn)
            src = file(p)
            for l in src :
                if inclRe.match(l) :
                    src.close()
                    src = file(p)
                    temp = p+".NEW"
                    dest = file(temp,"w+")
                    for ln in src :
                        m = inclRe.match(ln)
                        if m :
                            dest.write(m.group(1)+"<"+m.group(2)+">"+
                                       m.group(3))
                        else :
                            dest.write(ln)
                    src.close()
                    dest.close()
                    backup = p+".BAK"
                    if os.access(backup,os.F_OK) :
                        os.remove(backup)
                    os.rename(p,backup)
                    os.rename(temp,p)
                    break
                            
    if 'CVS' in dirs :
        dirs.remove('CVS')


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk