> I'm sure. This is something that I would be interested in revisiting; > do you have any pointers to particularly relevant information? I > wonder how nicely these tree automata could be packaged into an > awk-like form.
In addition to what others have suggested, look up [tree regular expressions] and [regular tree expressions]. Regarding ssam, I've always found it equally workable, if slightly clunky, to cat >/tmp/a; echo script | sam -d /tmp/a; cat /tmp/a. In fact, most of the time I want to be able to iterate over the whole input multiple times, so it's hard to imagine doing better. Russ