Improve lexer error messages for internal error type.

The lex_error method needs further work, it has no notion of context
and dumps some garbage on the user in several cases. This is one small
step in fixing this.