exception Macro_not_found of string exception Utf8_not_found of string let dump_file = "macro_table.dump" let init () = let ic = open_in dump_file in let (macro2utf8, utf82macro): ((string, string) Hashtbl.t * (string, string) Hashtbl.t) = Marshal.from_channel ic in close_in ic; (macro2utf8, utf82macro) let (macro2utf8, utf82macro) = init () let expand macro = try Hashtbl.find macro2utf8 macro with Not_found -> raise (Macro_not_found macro) let contract utf8 = try Hashtbl.find utf82macro utf8 with Not_found -> raise (Utf8_not_found utf8)