removed obsolete alphanum;
authorwenzelm
Thu, 23 Nov 2006 20:33:33 +0100
changeset 21495 145beb88536a
parent 21494 a29412af6aa3
child 21496 a3ac0c55393f
removed obsolete alphanum;
src/Pure/General/symbol.ML
--- a/src/Pure/General/symbol.ML	Thu Nov 23 20:33:32 2006 +0100
+++ b/src/Pure/General/symbol.ML	Thu Nov 23 20:33:33 2006 +0100
@@ -64,7 +64,6 @@
   val default_raw: string -> string
   val xsymbolsN: string
   val symbol_output: string -> string * real
-  val alphanum: string -> string
 end;
 
 structure Symbol: SYMBOL =
@@ -493,26 +492,6 @@
   in implode (rev ss' @ qs) end;
 
 
-(*turning arbitrary names into alphanumerics*)
-
-fun alphanum s =
-  let
-    fun replace_invalid c (last_inv, cs) =
-      if (is_ascii_letter c orelse is_ascii_digit c orelse c = "'")
-        andalso not ("." = c)   (* FIXME !? *)
-      then (false, if last_inv then c :: "_" :: cs else c :: cs)
-      else (true, cs);
-    fun prefix_num_empty [] = ["x"]
-      | prefix_num_empty (cs as c::_) =
-          if is_ascii_digit c
-          then "x" :: cs
-          else cs;
-    val (prefix, cs1) = case explode s of "'"::cs => ("'", cs) | cs => ("", cs);
-    val (_, cs2) = fold_rev replace_invalid cs1 (false, []);
-    val cs3 = prefix_num_empty cs2;
-  in implode (prefix :: cs3) end;
-
-
 
 (** print modes **)