Also added some asserts before further edits
(WIP) ParserStack.calculate_and_clear_pushes_at_end() wraps the nondestructive version and updates ParserStack.committed