+/*---------------------------.
+| Display the help message. |
+`---------------------------*/
+
+static void
+usage (FILE *stream)
+{
+ /* Some efforts were made to ease the translators' task, please
+ continue. */
+ fputs (_("\
+GNU bison generates parsers for LALR(1) grammars.\n"), stream);
+ putc ('\n', stream);
+
+ fprintf (stream, _("\
+Usage: %s [OPTION]... FILE\n"), program_name);
+ putc ('\n', stream);
+
+ fputs (_("\
+If a long option shows an argument as mandatory, then it is mandatory\n\
+for the equivalent short option also. Similarly for optional arguments.\n"),
+ stream);
+ putc ('\n', stream);
+
+ fputs (_("\
+Operation modes:\n\
+ -h, --help display this help and exit\n\
+ -V, --version output version information and exit\n\
+ -y, --yacc emulate POSIX yacc\n"), stream);
+ putc ('\n', stream);
+
+ fputs (_("\
+Parser:\n\
+ -S, --skeleton=FILE specify the skeleton to use\n\
+ -t, --debug instrument the parser for debugging\n\
+ --locations enable locations computation\n\
+ -p, --name-prefix=PREFIX prepend PREFIX to the external symbols\n\
+ -l, --no-lines don't generate `#line' directives\n\
+ -n, --no-parser generate the tables only\n\
+ -k, --token-table include a table of token names\n\
+"), stream);
+ putc ('\n', stream);
+
+ fputs (_("\
+Output:\n\
+ -d, --defines also produce a header file\n\
+ -v, --verbose also produce an explanation of the automaton\n\
+ -b, --file-prefix=PREFIX specify a PREFIX for output files\n\
+ -o, --output=FILE leave output to FILE\n\
+ -g, --graph also produce a VCG description of the automaton\n\
+"), stream);
+ putc ('\n', stream);
+
+ fputs (_("\
+Report bugs to <bug-bison@gnu.org>.\n"), stream);
+}
+
+
+/*------------------------------.
+| Display the version message. |
+`------------------------------*/
+
+static void
+version (FILE *stream)
+{
+ /* Some efforts were made to ease the translators' task, please
+ continue. */
+ fprintf (stream, _("\
+bison (GNU Bison) %s"), VERSION);
+ putc ('\n', stream);
+ putc ('\n', stream);
+
+ fputs (_("\
+Copyright 1984, 1986, 1989, 1992, 2000, 2001, 2002\n\
+Free Software Foundation, Inc.\n"),
+ stream);
+
+ fputs (_("\
+This is free software; see the source for copying conditions. There is NO\n\
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
+"),
+ stream);
+}
+
+
+/*----------------------.
+| Process the options. |
+`----------------------*/
+
+/* Under DOS, there is no difference on the case. This can be
+ troublesome when looking for `.tab' etc. */
+#ifdef MSDOS
+# define AS_FILE_NAME(File) (strlwr (File), (File))
+#else
+# define AS_FILE_NAME(File) (File)
+#endif
+