]>
git.saurik.com Git - bison.git/blob - build-aux/cross-options.pl
10 if (/^\s
* # Initial spaces.
11 (?:(-\w
),\s
+)? # $1: Possible short option.
12 (--[-\w
]+) # $2: Long option.
13 (\
[?) # $3: '[' iff the argument is optional.
14 (?:=([-\w
]+))? # $4: Possible argument name.
17 my ($short, $long, $opt, $arg) = ($1, $2, $3, $4);
18 $short = defined $short ? '@option{' . $short . '}' : '';
22 $arg = '@var{' . lc ($arg) . '}';
23 $arg = '[' . $arg . ']'
25 $option{"$long=$arg"} = $short ? "$short $arg" : '';
29 $option{"$long"} = "$short";
34 foreach my $long (sort keys %option)
36 printf "\@item %-40s \@tab %s\n", '@option{' . $long . '}', $option{$long};