Imnproved error reporting for lexer