aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/unicode.mli
diff options
context:
space:
mode:
authorGravatar letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7>2012-09-18 15:06:42 +0000
committerGravatar letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7>2012-09-18 15:06:42 +0000
commitbf08866eabad4408de975bae92f3b3c1f718322c (patch)
treefaab2a63879ce58c26ed5439a21af47a06226051 /lib/unicode.mli
parent4422e16f529359bb96c7eee214b2b6648958ef48 (diff)
More cleanup of Util: utf8 aspects moved to a new file unicode.ml
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@15818 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'lib/unicode.mli')
-rw-r--r--lib/unicode.mli27
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/unicode.mli b/lib/unicode.mli
new file mode 100644
index 000000000..763123306
--- /dev/null
+++ b/lib/unicode.mli
@@ -0,0 +1,27 @@
+(************************************************************************)
+(* v * The Coq Proof Assistant / The Coq Development Team *)
+(* <O___,, * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2012 *)
+(* \VV/ **************************************************************)
+(* // * This file is distributed under the terms of the *)
+(* * GNU Lesser General Public License Version 2.1 *)
+(************************************************************************)
+
+(** Unicode utilities *)
+
+type status = Letter | IdentPart | Symbol
+
+exception Unsupported
+
+(** Classify a unicode char into 3 classes, or raise [Unsupported] *)
+val classify : int -> status
+
+(** Check whether a given string be used as a legal identifier.
+ - [None] means yes
+ - [Some (b,s)] means no, with explanation [s] and severity [b] *)
+val ident_refutation : string -> (bool * string) option
+
+(** First char of a string, converted to lowercase *)
+val lowercase_first_char : string -> string
+
+(** For extraction, turn a unicode string into an ascii-only one *)
+val ascii_of_ident : string -> string