Index: ChangeLog from Akim Demaille 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 + 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 "address@hidden %-40s address@hidden %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 address@hidden@var{defines-file}}} address@hidden @var{file-prefix}XXX}} @headitem Long Option @tab Short Option address@hidden @option{--debug} @tab @option{-t} address@hidden @address@hidden @tab @option{-d} address@hidden @address@hidden @tab @option{-b @var{file-prefix}} address@hidden @address@hidden @tab @option{-d} address@hidden @option{--help} @tab @option{-h} address@hidden @address@hidden @tab @option{-p @var{name-prefix}} address@hidden @option{--no-lines} @tab @option{-l} address@hidden @address@hidden @tab @option{-o @var{outfile}} address@hidden @option{--print-localedir} @tab address@hidden @option{--print-datadir} @tab address@hidden @option{--token-table} @tab @option{-k} address@hidden @option{--verbose} @tab @option{-v} address@hidden @option{--version} @tab @option{-V} address@hidden @option{--yacc} @tab @option{-y} address@hidden cross-options.texi @end multitable @node Yacc Library