improve parser error reporting