Subject: Re: [proto] So I heard proto make AST ...
From: joel falcou (joel.falcou_at_[hidden])
Date: 2010-08-11 12:00:06
On 11/08/10 17:52, Eric Niebler wrote:
> I don't exactly recall the details of Joel's technique. My experiments
> to separate transforms from grammars were largely unsuccessful because
> control flow often need pattern matching. I'd like to see alternate designs.
Mine was just a post-order traversal by a visitor that could be
specialized on node's tag
> Ah, but the control flow of this transform depends on pattern matching
> (i.e., the grammar) to dispatch to the correct handler. I'm interested
> to see what this arity calculation would look like with a tree traversal.
Last time I tried, i ended up needing a meta-function that gave you the
arity of any tag.
Then you did a fold of max over the tree traversal.
Proto list run by eric at boostpro.com