On 15/10/10 09:22, Eric Niebler wrote:
Goodness Joel, I have no idea what you're asking. What's the "visitor
level"? Why would you have to transform the AST? What are you trying to
do, exactly?
LOL, please excuse my non-caeffinated post at 8am :€

I have some AST that represent arithmetic computation.
I know that when I encouter a "a + b*c" node (where a,b,c can be expression
themselves), I can evaluate it using an optimised call instead
of chaining + and *.

Currently I do this by transforming my AST into another where a+b*c
is replaced by madd(a,b,c). Now, with your specialization of dispatch using
grammar instead of tag, I can check for a+b*c and dispacth to a special trasnform
instead of having a bloated trasnform next to that.

_______________________________________________
proto mailing list
proto@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/proto

Reply via email to