From 39f06c597a614b9cf8f6ff6ff677cced1d76dae5 Mon Sep 17 00:00:00 2001 From: Damien Doligez Date: Sat, 27 Nov 2004 01:04:19 +0000 Subject: PR#3085 ajout option "-version" git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6701 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02 --- yacc/main.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'yacc/main.c') diff --git a/yacc/main.c b/yacc/main.c index 978aac0e0..41e1cb7bc 100644 --- a/yacc/main.c +++ b/yacc/main.c @@ -21,6 +21,8 @@ #include #endif +#include "version.h" + char dflag; char lflag; char rflag; @@ -163,7 +165,13 @@ void getargs(int argc, char **argv) goto no_more_options; case 'v': - vflag = 1; + if (!strcmp (argv[i], "-version")){ + printf ("The Objective Caml parser generator, version " + OCAML_VERSION "\n"); + exit (0); + }else{ + vflag = 1; + } break; case 'q': -- cgit v1.2.3-70-g09d2