X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2FgTopLevel%2FoldDisambiguate.ml;h=b760b3b8ce86d4c6e3ee3dd19fe934b7cd741195;hb=ac7687ce66526f905874ed99a845223c853c558a;hp=82d0f36f5ddc519b029ba4b6e46f5ff5b76c2eda;hpb=c0e0ae45ee6fba4118f519b9d07169ed6a7edc8c;p=helm.git diff --git a/helm/gTopLevel/oldDisambiguate.ml b/helm/gTopLevel/oldDisambiguate.ml index 82d0f36f5..b760b3b8c 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 @@ -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