Tree traversal without recursion: the tree as a state machine.