Boost logo

Proto :

Subject: Re: [proto] Thoughts on traversing proto expressions and reusing grammar
From: Joel de Guzman (joel_at_[hidden])
Date: 2010-10-16 20:04:03

On 10/5/2010 3:43 AM, Thomas Heller wrote:
> On Mon, Oct 4, 2010 at 8:45 PM, Eric Niebler<eric_at_[hidden]> wrote:
>> On 10/4/2010 6:49 AM, Thomas Heller wrote:
>>> Hi,
>>> I spent some time on thinking how one could make the traversal of a proto
>>> expression tree easier. I know want to share my findings with you all, and
>>> propose a new addition to proto.
>>> My first idea was to decouple grammars from transforms, to follow the idea of
>>> separation of data and algorithm.
>> Data and algorithm are already separate in Proto. "Data" is the
>> expression to traverse. "Algorithm" is the transform, driven by
>> pattern-matching in the grammar.
> True, but you can only attach one grammar to one transform. Thus for
> every transformation you want to make, you need (in theory) replicate
> your grammar, see further down that this is not the case in real life.

(I'm slowly trying to grok all these. Pardon my recent inactivity. It
was really meant to be a sabbatical to assess where I am now in terms
of C++ coding.)

Anyway, this one is very appealing indeed:

   one grammar to multiple transforms

, not exclusively in the standpoint of Proto but can have
implications for Spirit as well. I'm listening/reading...


Joel de Guzman

Proto list run by eric at