Boost logo

Boost :

From: Joel de Guzman (joel_at_[hidden])
Date: 2004-03-25 02:46:23


Jeremy Siek wrote:

> Hi Hiraki,
>
> On Mar 16, 2004, at 3:47 AM, HIRAKI Hideaki wrote:
>
>> Hello there,
>> I submitted a bug fix on read_graphviz() to the bug tracker (Bug
>> ID 865882, see P.P.S. below for the summary). When thinking about
>> possible fixes, I got some questions.
>>
>> Q1) May boost depend on build tools other than C++ compiler?
>> There seemed to be a building problem due to the dependency of the
>> parser code on some specific versions of bison. This is not a real
>> problem because the generated C++ codes are bundled. I think the
>> dependency should be removed, if possible.
>
>
> That sounds reasonable.
>
>> Q2) How easy is it to migrate a flex/bison code to spirit?
>> Boost seems to have its own parser generator, spirit. Its features
>> are uncertain for me. I just expect that it is straightforward for
>> an expert of spirit to write a reentrant parser to be replaced with
>> the current flex/bison parser.
>
>
> I am also not an expert with the spirit parser, but that sounds like a
> promising
> direction. Another approach would be to just write the parser by hand in
> C++.

Sorry I missed this post. Yes, you can write reentrant parsers using
Spirit. How long it will take depends, of course, on the complexity
of your grammar. It might help if you could post your grammar to
Spirit's mailing list, in the hope that, perhaps someone might have
already implemented something similar. It's also good that you already
have a grammar to begin with. For instance, Hartmut Kaiser transformed
the C parser from YACC to Spirit in a fairly short time, IIRC. It involved
some adjustment for transforming LR to LL (dealing with left recursion,
etc.).

For further discussion, please post to:

Spirit-general mailing list
Spirit-general_at_[hidden]
https://lists.sourceforge.net/lists/listinfo/spirit-general

Cheers,

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

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