mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
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.
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
2007-11-04 Akim Demaille <demaille@gostai.com>
|
||||
|
||||
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 <demaille@gostai.com>
|
||||
|
||||
Generate bison.1 using help2man.
|
||||
|
||||
32
build-aux/cross-options.pl
Executable file
32
build-aux/cross-options.pl
Executable file
@@ -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 "\@item %-40s \@tab %s\n", '@option{' . $long . '}', $option{$long};
|
||||
}
|
||||
@@ -7861,20 +7861,7 @@ the corresponding short option.
|
||||
|
||||
@multitable {@option{--defines=@var{defines-file}}} {@option{-b @var{file-prefix}XXX}}
|
||||
@headitem Long Option @tab Short Option
|
||||
@item @option{--debug} @tab @option{-t}
|
||||
@item @option{--defines=@var{defines-file}} @tab @option{-d}
|
||||
@item @option{--file-prefix=@var{prefix}} @tab @option{-b @var{file-prefix}}
|
||||
@item @option{--graph=@var{graph-file}} @tab @option{-d}
|
||||
@item @option{--help} @tab @option{-h}
|
||||
@item @option{--name-prefix=@var{prefix}} @tab @option{-p @var{name-prefix}}
|
||||
@item @option{--no-lines} @tab @option{-l}
|
||||
@item @option{--output=@var{outfile}} @tab @option{-o @var{outfile}}
|
||||
@item @option{--print-localedir} @tab
|
||||
@item @option{--print-datadir} @tab
|
||||
@item @option{--token-table} @tab @option{-k}
|
||||
@item @option{--verbose} @tab @option{-v}
|
||||
@item @option{--version} @tab @option{-V}
|
||||
@item @option{--yacc} @tab @option{-y}
|
||||
@include cross-options.texi
|
||||
@end multitable
|
||||
|
||||
@node Yacc Library
|
||||
|
||||
Reference in New Issue
Block a user