let print ppf =
                  function
                  | Illegal_character c ->
                      fprintf ppf "Illegal character (%s)" (Char.escaped c)
                  | Illegal_escape s ->
                      fprintf ppf
                        "Illegal backslash escape in string or character (%s)"
                        s
                  | Unterminated_comment ->
                      fprintf ppf "Comment not terminated"
                  | Unterminated_string ->
                      fprintf ppf "String literal not terminated"
                  | Unterminated_string_in_comment ->
                      fprintf ppf
                        "This comment contains an unterminated string literal"
                  | Unterminated_quotation ->
                      fprintf ppf "Quotation not terminated"
                  | Unterminated_antiquot ->
                      fprintf ppf "Antiquotation not terminated"
                  | Literal_overflow ty ->
                      fprintf ppf
                        "Integer literal exceeds the range of representable integers of type %s"
                        ty
                  | Comment_start ->
                      fprintf ppf "this is the start of a comment"
                  | Comment_not_end ->
                      fprintf ppf "this is not the end of a comment"