improvements to lexical error reporting