V_______________________________________________________________ *)
{
+ module KT = String
+
module L = Log
module G = Options
module AP = AutParser
IFDEF QUOTE THEN
(* This turns an Automath identifier into an XML nmtoken *)
let quote id =
- let l = String.length id in
- let rec aux i =
- if i < l then begin
- if id.[i] = '\'' || id.[i] = '`' then id.[i] <- '_';
- aux (succ i)
- end else
- id
+ let map = function
+ | '\''
+ | '`' -> '_';
+ | c -> c
in
- aux 0
+ KT.map map id
END
}