Boost logo

Boost :

From: Eric Niebler (eric_at_[hidden])
Date: 2008-03-25 18:52:23


Hartmut Kaiser wrote:
>> Joel de Guzman wrote:
>>> In due time, I'll be using Dan traversal library.
>> With Proto? Or as a replacement for Proto? How do you intend to use
>> Dan's code in Spirit-2?
>
> It will be used to transform the data structures (well, currently not the
> 'structure' itself, but the contents) as generated by a parser. The
> transformed data items then could be feed back to a generator to create some
> transformed output.

OK, parsing builds a DOM, and the traversal library manipulates the DOM.

> OTOH, I could see the possibility to use Spirit-2 parsers directly with the
> traversal library. It should be possible and very powerful to use a Spirit-2
> (parser) grammar to describe the node types to transform.

Not sure I get this part. If the result of the parse is a DOM, then the
Spirit grammar is like the schema. So ... you would be annotating your
schema with attribute transforms? That would be like semantic actions,
except they would be applied to the DOM after the parse completes?

-- 
Eric Niebler
Boost Consulting
www.boost-consulting.com

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