extend parser with error-reporting