bpo-40334: Set error_indicator in _PyPegen_raise_error by lysnikolaou · Pull Request #19887 · python/cpython
Due to PyErr_Occurred not being called at the beginning of each rule
(too expensive), we need to set the error indicator, so that
rules do not get expanded, after an exception has been thrown.