X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2FgTopLevel%2FoldDisambiguate.ml;h=24dd30f91077f48c7daf21a87a130e988cb83553;hb=4167cea65ca58897d1a3dbb81ff95de5074700cc;hp=9b1d4937cfc1de9a3cc660301c4e6caf4a7a2fda;hpb=29442b4d21cf07992ad4e5c981085dada1f90fe4;p=helm.git diff --git a/helm/gTopLevel/oldDisambiguate.ml b/helm/gTopLevel/oldDisambiguate.ml index 9b1d4937c..24dd30f91 100644 --- a/helm/gTopLevel/oldDisambiguate.ml +++ b/helm/gTopLevel/oldDisambiguate.ml @@ -47,7 +47,7 @@ module type Callbacks = title:string -> msg:string -> id:string -> string list -> string list val interactive_interpretation_choice : (string * string) list list -> int list - val input_or_locate_uri : title:string -> UriManager.uri + val input_or_locate_uri : title:string -> ?id:string -> unit -> UriManager.uri end ;; @@ -78,7 +78,7 @@ module Make(C:Callbacks) = [] -> [UriManager.string_of_uri (C.input_or_locate_uri - ~title:("URI matching \"" ^ id ^ "\" unknown."))] + ~title:("URI matching \"" ^ id ^ "\" unknown.") ~id ())] | [uri] -> [uri] | _ -> C.interactive_user_uri_choice @@ -160,15 +160,15 @@ module Make(C:Callbacks) = let metasenv',expr = mk_metasenv_and_expr resolve_id' in (*CSC: Bug here: we do not try to typecheck also the metasenv' *) try - let term,_,metasenv'' = - CicRefine.type_of_aux' metasenv' context expr + let term,_,metasenv'',_ = (* TASSI: FIXME what are we doning here?*) + CicRefine.type_of_aux' metasenv' context expr CicUniv.empty_ugraph in - Ok (term,metasenv'') + Ok (term,metasenv'') (* TASSI: whould we pass back the ugraph? *) with CicRefine.Uncertain _ -> prerr_endline ("%%% UNCERTAIN!!! " ^ CicPp.ppterm expr) ; Uncertain - | _ -> + | CicRefine.RefineFailure _ -> prerr_endline ("%%% PRUNED!!! " ^ CicPp.ppterm expr) ; Ko in @@ -322,12 +322,13 @@ module EnvironmentP3 = let regexpr = let alfa = "[a-zA-Z_-]" in let digit = "[0-9]" in - let ident = alfa ^ "\(" ^ alfa ^ "\|" ^ digit ^ "\)*" in - let blanks = "\( \|\t\|\n\)+" in + let ident = alfa ^ "\\(" ^ alfa ^ "\\|" ^ digit ^ "\\)*" in + let blanks = "\\( \\|\t\\|\n\\)+" in let nonblanks = "[^ \t\n]+" in - let uri = "/\(" ^ ident ^ "/\)*" ^ nonblanks in (* not very strict check *) + let uri = "/\\(" ^ ident ^ "/\\)*" ^ nonblanks in + (* not very strict check *) Str.regexp - ("alias" ^ blanks ^ "\(" ^ ident ^ "\)" ^ blanks ^ "\(" ^ uri ^ "\)") + ("alias" ^ blanks ^ "\\(" ^ ident ^ "\\)" ^ blanks ^ "\\(" ^ uri ^ "\\)") in let rec aux n = try