Factor out some error reporting code used when the parser is expected to report an error, and either doesn't report an error at all or reports the wrong error.
Factor out some error reporting code used when the parser is expected
to report an error, and either doesn't report an error at all or
reports the wrong error.

libexpat/libexpat,tiran/expat,libexpat/libexpat,tiran/expat,tiran/expat,libexpat/libexpat,libexpat/libexpat,tiran/expat,libexpat/libexpat,libexpat/libexpat