Separated error reporting from parsing