Index: ChangeLog
from Akim Demaille <[EMAIL PROTECTED]>
Generate the long/short option cross-table.
* build-aux/cross-options.pl: New.
* doc/Makefile.am (cross-options.texi): New.
* doc/bison.texinfo: Use it.
+2007-11-04 Akim Demaille <[EMAIL PROTECTED]>
+
Generate bison.1 using help2man.
* doc/common.x, doc/bison.x: New.
* doc/Makefile.am (bison.1, .x.1): New.
Index: build-aux/cross-options.pl
===================================================================
RCS file: build-aux/cross-options.pl
diff -N build-aux/cross-options.pl
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ build-aux/cross-options.pl 4 Nov 2007 21:14:01 -0000
@@ -0,0 +1,32 @@
+#! /usr/bin/env perl
+
+use warnings;
+use 5.005;
+use strict;
+
+my %option;
+while (<>)
+{
+ if (/^\s*(?:(-\w), )?(--[-\w]+)(\[?)(=[-\w]+)?\]?/)
+ {
+ my ($short, $long, $opt, $arg) = ($1, $2, $3, $4);
+ $short = defined $short ? '@option{' . $short . '}' : '';
+ if ($arg)
+ {
+ $arg =~ s/^=//;
+ $arg = '@var{' . lc ($arg) . '}';
+ $arg = '[' . $arg . ']'
+ if defined $opt;
+ $option{"$long=$arg"} = "$short $arg";
+ }
+ else
+ {
+ $option{"$long"} = "$short";
+ }
+ }
+}
+
+foreach my $long (sort keys %option)
+{
+ printf "[EMAIL PROTECTED] %-40s [EMAIL PROTECTED] %s\n", '@option{' .
$long . '}', $option{$long};
+}
Index: doc/bison.texinfo
===================================================================
RCS file: /cvsroot/bison/bison/doc/bison.texinfo,v
retrieving revision 1.243
diff -u -w -r1.243 bison.texinfo
--- doc/bison.texinfo 29 Oct 2007 17:36:39 -0000 1.243
+++ doc/bison.texinfo 4 Nov 2007 21:14:04 -0000
@@ -7861,20 +7861,7 @@
@multitable [EMAIL PROTECTED]@var{defines-file}}} [EMAIL PROTECTED]
@var{file-prefix}XXX}}
@headitem Long Option @tab Short Option
[EMAIL PROTECTED] @option{--debug} @tab @option{-t}
[EMAIL PROTECTED] @[EMAIL PROTECTED] @tab @option{-d}
[EMAIL PROTECTED] @[EMAIL PROTECTED] @tab @option{-b @var{file-prefix}}
[EMAIL PROTECTED] @[EMAIL PROTECTED] @tab @option{-d}
[EMAIL PROTECTED] @option{--help} @tab @option{-h}
[EMAIL PROTECTED] @[EMAIL PROTECTED] @tab @option{-p @var{name-prefix}}
[EMAIL PROTECTED] @option{--no-lines} @tab @option{-l}
[EMAIL PROTECTED] @[EMAIL PROTECTED] @tab @option{-o @var{outfile}}
[EMAIL PROTECTED] @option{--print-localedir} @tab
[EMAIL PROTECTED] @option{--print-datadir} @tab
[EMAIL PROTECTED] @option{--token-table} @tab @option{-k}
[EMAIL PROTECTED] @option{--verbose} @tab @option{-v}
[EMAIL PROTECTED] @option{--version} @tab @option{-V}
[EMAIL PROTECTED] @option{--yacc} @tab @option{-y}
[EMAIL PROTECTED] cross-options.texi
@end multitable
@node Yacc Library