add support for inspecting the state of the parser