summaryrefslogtreecommitdiff
path: root/lex
diff options
context:
space:
mode:
authorDamien Doligez <damien.doligez-inria.fr>2004-08-20 17:04:35 +0000
committerDamien Doligez <damien.doligez-inria.fr>2004-08-20 17:04:35 +0000
commitc3a39fc8c84698aa4985c779e16493c2409a0285 (patch)
tree0454ddf1543d0f6a78f9b6d6fff79ae8080f48e1 /lex
parent8030a20089b6ed8a7b654c189f00a6f3693f8bce (diff)
downloadocaml-c3a39fc8c84698aa4985c779e16493c2409a0285.tar.gz
Fusion des modifs de la branche release308 entre 3.08.0 et 3.08.1
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6612 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'lex')
-rw-r--r--lex/main.ml7
1 files changed, 7 insertions, 0 deletions
diff --git a/lex/main.ml b/lex/main.ml
index 03b9ac91ef..280537ca1b 100644
--- a/lex/main.ml
+++ b/lex/main.ml
@@ -23,12 +23,19 @@ let output_name = ref None
let usage = "usage: ocamlex [options] sourcefile"
+let print_version_string () =
+ print_string "The Objective Caml lexer generator, version ";
+ print_string Sys.ocaml_version ; print_newline();
+ exit 0
+
let specs =
["-ml", Arg.Set ml_automata,
" Output code that does not use the Lexing module built-in automata interpreter";
"-o", Arg.String (fun x -> output_name := Some x),
" <file> Set output file name to <file>";
"-q", Arg.Set Common.quiet_mode, " Do not display informational messages";
+ "-v", Arg.Unit print_version_string, " Print version and exit";
+ "-version", Arg.Unit print_version_string, " Print version and exit";
]
let _ =