Boost Users :
Subject: Re: [Boost-users] [Proto] Splitting AST
From: Eric Niebler (eric_at_[hidden])
Date: 2009-03-03 14:45:33
Joel Falcou wrote:
> Eric Niebler a écrit :
>> You're right, that's tricky. I'll think about it as time allows.
> Best I have is having a state which is a pair of mpl::int and
> fusion::vector. Each split push_back its siblings, add the proper
> placeholder to its parent and increment the placehodler # in the state.
> Hardest part is putting the placeholder in the parent :/
> Maybe a two pass trasnform is needed ?
I was thinking along the same lines. Maybe a first transform finds all
unnumbered placeholders and replaces them with monotonically increasing
placeholders. The following transform does just that:
http://codepad.org/A7HnOvgd. It's not what you asked for, but maybe it
helps. (Tested on msvc-9.)
-- Eric Niebler BoostPro Computing http://www.boostpro.com
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net