My original thought was to decouple the runtime from the LR parser generator by making TSParser a generic interface that LR parsers implement. I think this was more trouble than it was worth.