let report_error = function
| Illegal_character c ->
Printf.sprintf "Illegal character (%s)" (Char.escaped c)
| Illegal_escape s ->
Printf.sprintf "Illegal backslash escape in string or character (%s)" s
| Unterminated_comment ->
Printf.sprintf "Comment not terminated"
| Unterminated_string ->
Printf.sprintf "String literal not terminated"
| Keyword_as_label kwd ->
Printf.sprintf "`%s' is a keyword, it cannot be used as label name" kwd
| Literal_overflow ty ->
Printf.sprintf "Integer literal exceeds the range of representable integers of type %s" ty
| End_with_no_begin s ->
Printf.sprintf "The closing '%s' has no matching open equivalent" s