raise a proper exception on lexing errors