let term_string = req#param "term" in
let (context, metasenv) = ([], []) in
let id_to_uris_raw = req#param "aliases" in
-(*XXX
- let tokens = Pcre.split ~pat:"\\s" id_to_uris_raw in
- let rec parse_tokens keys lookup = function (* TODO spostarla fuori *)
- | [] -> keys, lookup
- | "alias" :: key :: value :: rest ->
- let key' = CicTextualParser0.Id key in
- parse_tokens
- (key'::keys)
- (fun id ->
- if id = key' then
- Some
- (CicTextualParser0.Uri (MQueryMisc.cic_textual_parser_uri_of_string value))
- else lookup id)
- rest
- | _ -> failwith "Can't parse aliases"
- in
-*)
let parse_choices choices_raw =
let choices = Pcre.split ~pat:";" choices_raw in
List.fold_left
(fun line ->
let new_aliases =
DisambiguatingParser.EnvironmentP3.to_string id_to_uris' in
-(*XXX
- match id_to_uris' with
- | (domain, f) ->
- String.concat ", "
- (List.map
- (fun name ->
- sprintf "\'alias %s cic:%s\'"
- (match name with
- CicTextualParser0.Id name -> name
- | _ -> assert false (*CSC: completare *))
- (match f name with
- | None -> assert false
- | Some (CicTextualParser0.Uri t) ->
- MQueryMisc.string_of_cic_textual_parser_uri
- t
- | _ -> assert false (*CSC: completare *)))
- domain)
- in
-*)
let processed_line =
apply_substs
[results_RE, theory_of_result results ;