Boost logo

Boost :

Subject: Re: [boost] [GSoC] Helping out Phoenix v3
From: Joel de Guzman (joel_at_[hidden])
Date: 2010-04-02 21:42:07

On 4/2/2010 11:43 PM, Joel Falcou wrote:
> Ok, ppl may look at :
> login/passwd : boost/boost
> to get a look at how I see the internals of the new phoenix working.
> The code is just a proto transform that evaluate any kind of expression
> and values from a fusion vector in a recursive, customizable way.
> Basically, it needs to be wrapped into a proper proto grammar+
> expression to hide that.
> Now, if you wanted to add for exampel a if_[] statement and have it
> evaluated properly you can overload either the evaluate PFO or
> specialize process_node.
> If you need to do otherthign with the expression, build a new evlauator
> like PFO and build another compile<T> instance (like coutning arity,
> turn the expression into a std::string, etc). You will notice that both
> the process_node and evaluator are proto agnostic.
> I'll advice using make_expr over const object to reduce compile-time (as
> stated in a old post of mine) and maybe use CRTP so we can imbue
> placeholder with proper method generating expression.

Joel, this is a wonderful start. I'll peruse the code when I get some time.
Let me add though that would be candidates study the phoenix code very
well. The last thing we would want to do is rewrite everything from scratch.
That's not my intent and that would be foolish. The strategy is to port the
"core" plus the extension mechanism to proto. By doing so, the rest would
follow nicely. That's what Eric (Niebler) did in his initial port. I would
insist not to wander too far from Eric's initial port, so I suggest studying
his code as well.

CC'ing Eric. Eric, could you send me the latest and the greatest of your
port for me to upload it somewhere prominent?


Joel de Guzman
Meet me at BoostCon

Boost list run by bdawes at, gregod at, cpdaniel at, john at