Re: [proto] Manipulating an expression tree

2011-04-06 Thread Bart Janssens
On Wed, Apr 6, 2011 at 10:29 PM, Karsten Ahnert karsten.ahn...@ambrosys.de wrote: Is there a direct way to transform an expression tree into another one? For example, is it possible that every proto::plus node is transformed to it left child? I tried to solve this problem via protos build-in

Re: [proto] Manipulating an expression tree

2011-04-06 Thread Karsten Ahnert
Great! It works perfectly, alltough I don't understand the code completely yet. Another question is: can a node have a state. In my algorithm it would be nice, if every proto::multiplies node stores some intermediate values which are used during later evaluations of the tree. Thanks, Karsten

Re: [proto] Manipulating an expression tree

2011-04-06 Thread Eric Niebler
(Please don't top-post. Rearranging...) On 4/7/2011 5:45 AM, Karsten Ahnert wrote: On 04/06/2011 10:53 PM, Bart Janssens wrote: On Wed, Apr 6, 2011 at 10:29 PM, Karsten Ahnert karsten.ahn...@ambrosys.de wrote: Is there a direct way to transform an expression tree into another one? For