Wednesday 20 June 2012
By unsolved parsing problems which I duly encountered (as anyone else) when hacking some AI software I got to tackle the problem myself.
Thanks to an excellent idea from Richard WM Jones for bypassing the "parser bootstrapping" question (which parser do you use to parse your grammar definition?) I managed to create a very small parser which solves both the grammar ambiguity problem and the awkwardness of semantic hooks in LR parsers.
Welcome to the LRTT parser!
The Left to Right Tree Traversal parser just does what it says, unambiguously running the semantic actions in a strict left to right order.