type uri = NUri.uri
type id = Aut.id
+type name = id * bool (* token, real? *)
-type attr = Name of id * bool (* name, real? *)
+type names = name list
+
+type attr = Name of name (* name *)
| Apix of int (* additional position index *)
| Mark of int (* node marker *)
| Meta of string (* metaliguistic annotation *)
| _ :: tl -> priv err f tl
| [] -> err ()
+let rec meta err f = function
+ | Meta s :: _ -> f s
+ | _ :: tl -> meta err f tl
+ | [] -> err ()
+
let resolve err f name a =
let rec aux i = function
| Name (n, true) :: _ when n = name -> f i
in
aux 0 a
+let rec rev_append_names ns = function
+ | [] -> ns
+ | Name n :: tl -> rev_append_names (n :: ns) tl
+ | _ :: tl -> rev_append_names ns tl
+
let xlate f xlate_term = function
| a, uri, Abst t ->
let f t = f (a, uri, Abst t) in xlate_term f t
let refresh_status st = {st with
si = !O.si; expand = !O.expand
}
+