X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=inline;f=helm%2Fsoftware%2Fcomponents%2Fbinaries%2Ftranscript%2Ftop.ml;h=b66146b2ea9e375ea9b729b3eee5c9c9d7658ff6;hb=a71920f51fcaecbe19812e255231e545fe013cfc;hp=5b3b234730fff1c8d61a06764aa22125ed10ffbb;hpb=4dc282b8b71479d45704b414d1a10a27e71752f1;p=helm.git
diff --git a/helm/software/components/binaries/transcript/top.ml b/helm/software/components/binaries/transcript/top.ml
index 5b3b23473..b66146b2e 100644
--- a/helm/software/components/binaries/transcript/top.ml
+++ b/helm/software/components/binaries/transcript/top.ml
@@ -24,18 +24,25 @@
*)
let main =
- let cwd = ref Filename.current_dir_name in
- let help = "Usage: transcript [ -C
] [ | ]*" in
+ let help = "Usage: transcript [ -glmpx | -C ] [ | ]*" in
let help_C = " set working directory to " in
- let help_vp = " verbose parsing" in
- let help_vl = " verbose lexing" in
- let help_vx = " verbose character escaping" in
- let set_cwd dir = cwd := dir in
- let process_package package = Engine.produce (Engine.make !cwd package) in
- Engine.init ();
+ let help_g = " check for non existing objects" in
+ let help_l = " verbose lexing" in
+ let help_m = " minimal output generation" in
+ let help_p = " verbose parsing" in
+ let help_x = " verbose character escaping" in
+ let set_cwd dir = Options.cwd := dir; Engine.init () in
+ let process_file file =
+ if Sys.file_exists file || Sys.file_exists (file ^ Engine.suffix) then
+ begin Engine.produce (Engine.make file); Options.sources := [] end
+ else
+ Options.sources := file :: !Options.sources
+ in
Arg.parse [
("-C", Arg.String set_cwd, help_C);
- ("-vp", Arg.Set Options.verbose_parser, help_vp);
- ("-vl", Arg.Set Options.verbose_lexer, help_vl);
- ("-vx", Arg.Set Options.verbose_escape, help_vx);
- ] process_package help
+ ("-g", Arg.Set Options.getter, help_g);
+ ("-l", Arg.Set Options.verbose_lexer, help_l);
+ ("-m", Arg.Clear Options.comments, help_m);
+ ("-p", Arg.Set Options.verbose_parser, help_p);
+ ("-x", Arg.Set Options.verbose_escape, help_x);
+ ] process_file help