--- a/src/Pure/Syntax/syn_ext.ML Wed Jan 04 00:52:48 2006 +0100
+++ b/src/Pure/Syntax/syn_ext.ML Wed Jan 04 00:52:49 2006 +0100
@@ -51,6 +51,7 @@
token_translation: (string * string * (string -> string * real)) list}
val mfix_args: string -> int
val escape_mfix: string -> string
+ val unlocalize_mfix: string -> string
val syn_ext': bool -> (string -> bool) -> mfix list ->
string list -> (string * ((theory -> Ast.ast list -> Ast.ast) * stamp)) list *
(string * ((theory -> term list -> term) * stamp)) list *
@@ -232,6 +233,14 @@
val escape_mfix = implode o map (fn s => if is_meta s then "'" ^ s else s) o Symbol.explode;
end;
+val unlocalize_mfix =
+ let
+ fun unloc ("'" :: "\\<^loc>" :: ss) = unloc ss
+ | unloc ("\\<^loc>" :: ss) = unloc ss
+ | unloc (s :: ss) = s :: unloc ss
+ | unloc [] = [];
+ in Symbol.explode #> unloc #> implode end;
+
(* mfix_to_xprod *)