wrote error messages for lexing errors