Improve error reporting of parsers