]> matita.cs.unibo.it Git - helm.git/blob - helm/software/components/binaries/transcript/top.ml
Preparing for 0.5.9 release.
[helm.git] / helm / software / components / binaries / transcript / top.ml
1 (* Copyright (C) 2000, HELM Team.
2  * 
3  * This file is part of HELM, an Hypertextual, Electronic
4  * Library of Mathematics, developed at the Computer Science
5  * Department, University of Bologna, Italy.
6  * 
7  * HELM is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  * 
12  * HELM is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with HELM; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place - Suite 330, Boston,
20  * MA  02111-1307, USA.
21  * 
22  * For details, see the HELM World-Wide-Web page,
23  * http://cs.unibo.it/helm/.
24  *)
25
26 let main =
27    let help = "Usage: transcript [ -glmpx | -C <dir> ] [ <package> | <conf_file> ]*" in
28    let help_C = " set working directory to <dir>" in
29    let help_g = " check for non existing objects" in
30    let help_l = " verbose lexing" in
31    let help_m = " minimal output generation" in
32    let help_p = " verbose parsing" in
33    let help_x = " verbose character escaping" in
34    let set_cwd dir = Options.cwd := dir; Engine.init () in
35    let process_file file =
36       if Sys.file_exists file || Sys.file_exists (file ^ Engine.suffix) then
37          begin Engine.produce (Engine.make file); Options.sources := [] end
38       else
39          Options.sources := file :: !Options.sources
40    in
41    Arg.parse [
42       ("-C", Arg.String set_cwd, help_C);
43       ("-g", Arg.Set Options.getter, help_g);
44       ("-l", Arg.Set Options.verbose_lexer, help_l);
45       ("-m", Arg.Clear Options.comments, help_m);
46       ("-p", Arg.Set Options.verbose_parser, help_p);
47       ("-x", Arg.Set Options.verbose_escape, help_x);
48    ] process_file help