I’ve found the notion of a parent vector to be useful for parsing problems. I like to call them Apter trees after this article http://archive.vector.org.uk/art10500340, but it’s also the core idea in Aaron Hsu’s thesis.
This last is more compactly expressed as <\ when you have left to right folds which (unfortunately) APL does not.