$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] [Proto] Splitting AST
From: Eric Niebler (eric_at_[hidden])
Date: 2009-03-02 14:17:44
Joel Falcou wrote:
> Let's say I want to take an expression involving operators +,-,*,/ and a 
> function split.
> 
> What I want to do is writing a transform taking such an expression and 
> returning a fusion::vector or list  (I guess) of expressions containing 
> all sub-expressions of the original AST only separated on each insatcne 
> of a split call.
> 
> E.g :
> 
> Xpr = a+b+split( c*d + split(e-f));
> is turned into
> 
> Xprs = [ a+b+placeholder<1>, c*d+placeholder<2>, e-f];
> 
> I guess I should use the State/Data parameters of the transform but i 
> can't get the thing right. Any hints on how to tackle this without 
> losing hairs ?
You're right, that's tricky. I'll think about it as time allows.
-- Eric Niebler BoostPro Computing http://www.boostpro.com