in
try visit_t (fun x -> x) () t; false with Exit -> true
-let xpointer_RE = Str.regexp "[^#]+#xpointer(\\(.*\\))"
+let xpointer_RE = Str.regexp "\\([^#]+\\)#xpointer(\\(.*\\))"
let slash_RE = Str.regexp "/"
let term_of_uri s =
else if not (Str.string_match xpointer_RE s 0) then
raise (UriManager.IllFormedUri s)
else
- (match Str.split slash_RE (Str.matched_group 1 s) with
- | [_; tyno] -> Cic.MutInd (uri, int_of_string tyno - 1, [])
+ let (baseuri,xpointer) = (Str.matched_group 1 s, Str.matched_group 2 s) in
+ let baseuri = UriManager.uri_of_string baseuri in
+ (match Str.split slash_RE xpointer with
+ | [_; tyno] -> Cic.MutInd (baseuri, int_of_string tyno - 1, [])
| [_; tyno; consno] ->
Cic.MutConstruct
- (uri, int_of_string tyno - 1, int_of_string consno, [])
+ (baseuri, int_of_string tyno - 1, int_of_string consno, [])
| _ -> raise Exit))
with
| Exit