X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fcomponents%2Fbinaries%2Ftranscript%2Fengine.ml;h=c55a1d19c70697c2528d487c6c05162e4c662d2a;hb=14e2489ae86ecb6467fe9a7ba3b742a8d53c47ea;hp=a51d3f0c2bd9df07bd5d769a3b083dc18ea793a4;hpb=f1ecb87d00b1f4df3bdc43d5bcf1bda82cb22d7a;p=helm.git diff --git a/helm/software/components/binaries/transcript/engine.ml b/helm/software/components/binaries/transcript/engine.ml index a51d3f0c2..c55a1d19c 100644 --- a/helm/software/components/binaries/transcript/engine.ml +++ b/helm/software/components/binaries/transcript/engine.ml @@ -28,8 +28,8 @@ module X = HExtlib module HG = Http_getter module GA = GrafiteAst -module T = Types -module G = Grafite +module T = Types +module G = Grafite module O = Options type script = { @@ -66,8 +66,9 @@ let default_script = { let default_scripts = 2 +let suffix = ".conf.xml" + let load_registry registry = - let suffix = ".conf.xml" in let registry = if Filename.check_suffix registry suffix then registry else registry ^ suffix @@ -84,8 +85,10 @@ let set_files st = | None -> List.rev files | Some l -> let l = trim l in - if List.mem l st.excludes then aux files else aux (l :: files) - in + if List.mem l st.excludes then aux files else + if !O.sources = [] || List.mem l !O.sources then aux (l :: files) else + aux files + in let files = aux [] in let _ = Unix.close_process_in ich in {st with files = files} @@ -196,11 +199,17 @@ let make_script_name st script name = Filename.concat st.output_path (name ^ ext) let get_iparams st name = + let debug debug = GA.IPDebug debug in let map = function | "nodefaults" -> GA.IPNoDefaults | "coercions" -> GA.IPCoercions | "comments" -> GA.IPComments - | s -> failwith ("unknown inline parameter: " ^ s) + | s -> + try Scanf.sscanf s "debug-%u" debug with + | Scanf.Scan_failure _ + | Failure _ + | End_of_file -> + failwith ("unknown inline parameter: " ^ s) in List.map map (X.list_assoc_all name st.iparams)