Well, @Larry has been researching attribute grammars for a month or two now, which are an efficient (programmer-wise, not necessarily processor-wise) method for specifying computations over trees. The only syntax we've seen is that of Language::AttributeGrammar and TGE, whose roots come from UUAG. But I'd love to come up with a syntax that feels more integrated into the language.
There's a formal treatment of someone's effort to generalize regular expressions to trees here (PhD included): http://cnds.ucd.ie/~cetus/home/publications.html I don't know how this approach relates to attribute grammars. Hope the link might be useful, Brad -- ... But even a person who is good for nothing and exceedingly clumsy will be a reliable retainer if only he has the determination to think earnestly of his master. Having only wisdom and talent is the lowest tier of usefulness. -- Hagakure http://bereft.net/hagakure/