X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fmatita%2Fmatitac.ml;h=bb796db1e79d8f005630d227cfacd8bdee3437a7;hb=87ff483dd776e580fa97fca0e3bf888cc8a8d540;hp=64870249019b5e8e79ef29f062870bf5504d4584;hpb=ac813b7e251e4bac1a8a16befa628203775771ca;p=helm.git diff --git a/helm/matita/matitac.ml b/helm/matita/matitac.ml index 648702490..bb796db1e 100644 --- a/helm/matita/matitac.ml +++ b/helm/matita/matitac.ml @@ -84,15 +84,22 @@ let interpreter = ~disambiguator ~currentProof ~console ~dbd () let run_script fname = - message (sprintf "execution of %s started." fname); + message (sprintf "execution of %s started:" fname); let script = let ic = open_in fname in - let ast = snd (CicTextualParser2.parse_script (Stream.of_channel ic)) in + let ast = + try + snd (CicTextualParser2.parse_script (Stream.of_channel ic)) + with + exn -> + error (explain exn); + assert false (* should be something like (Unix.exit 1) *) + in close_in ic; ast in let rec aux = function - | [] -> () + | [] -> () (* script is over *) | DisambiguateTypes.Comment _ :: tl -> aux tl | DisambiguateTypes.Command ast :: tl -> let loc = @@ -107,7 +114,8 @@ let run_script fname = else aux tl in - aux script + aux script; + message (sprintf "execution of %s completed." fname) let _ = List.iter run_script scripts