add global state for each parse state for easier debugging.