]> git.saurik.com Git - bison.git/blobdiff - src/getargs.c
Deprecate %pure-parser and add `%define api.pure'. Discussed starting
[bison.git] / src / getargs.c
index 45b0dc847f22101eebd19dea64f4579ac4ff553f..bea533b60b59861536f331b25aab72daee1b6c69 100644 (file)
@@ -21,6 +21,7 @@
 #include <config.h>
 #include "system.h"
 #include "revision.h"
+#include "output.h"
 
 #include <argmatch.h>
 #include <c-strcase.h>
@@ -58,7 +59,6 @@ bool error_verbose = false;
 
 bool nondeterministic_parser = false;
 bool glr_parser = false;
-bool pure_parser = false;
 
 int report_flag = report_none;
 int trace_flag = trace_none;
@@ -261,6 +261,7 @@ Operation modes:\n\
   -h, --help                 display this help and exit\n\
   -V, --version              output version information and exit\n\
       --print-localedir      output directory containing locale-dependent data\n\
+      --print-datadir        output directory containing skeletons and XSLT\n\
   -y, --yacc                 emulate POSIX Yacc\n\
 \n\
 "), stdout);
@@ -321,7 +322,7 @@ version (void)
   putc ('\n', stdout);
 
   fprintf (stdout,
-          _("Copyright (C) %d Free Software Foundation, Inc.\n"), 2006);
+          _("Copyright (C) %d Free Software Foundation, Inc.\n"), 2007);
 
   fputs (_("\
 This is free software; see the source for copying conditions.  There is NO\n\
@@ -393,7 +394,8 @@ static char const short_options[] = "yvegxdhr:L:ltknVo:b:p:S:T::W";
 enum
 {
   LOCATIONS_OPTION = CHAR_MAX + 1,
-  PRINT_LOCALEDIR_OPTION
+  PRINT_LOCALEDIR_OPTION,
+  PRINT_DATADIR_OPTION
 };
 
 static struct option const long_options[] =
@@ -402,6 +404,7 @@ static struct option const long_options[] =
   { "help",            no_argument,      0,   'h' },
   { "version",         no_argument,      0,   'V' },
   { "print-localedir", no_argument,      0,   PRINT_LOCALEDIR_OPTION },
+  { "print-datadir",   no_argument,      0,   PRINT_DATADIR_OPTION   },
   { "warnings",        optional_argument, 0,   'W' },
 
   /* Parser. */
@@ -555,6 +558,10 @@ getargs (int argc, char *argv[])
        printf ("%s\n", LOCALEDIR);
        exit (EXIT_SUCCESS);
 
+      case PRINT_DATADIR_OPTION:
+       printf ("%s\n", compute_pkgdatadir ());
+       exit (EXIT_SUCCESS);
+
       default:
        usage (EXIT_FAILURE);
       }