Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Unified Diff: bison/src/bison/2.4.1/bison-2.4.1-src/build-aux/cross-options.pl

Issue 10807020: Add native Windows binary for bison. (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: bison/src/bison/2.4.1/bison-2.4.1-src/build-aux/cross-options.pl
===================================================================
--- bison/src/bison/2.4.1/bison-2.4.1-src/build-aux/cross-options.pl (revision 0)
+++ bison/src/bison/2.4.1/bison-2.4.1-src/build-aux/cross-options.pl (revision 0)
@@ -0,0 +1,37 @@
+#! /usr/bin/env perl
+
+use warnings;
+use 5.005;
+use strict;
+
+my %option;
+while (<>)
+{
+ if (/^\s* # Initial spaces.
+ (?:(-\w),\s+)? # $1: Possible short option.
+ (--[-\w]+) # $2: Long option.
+ (\[?) # $3: '[' iff the argument is optional.
+ (?:=([-\w]+))? # $4: Possible argument name.
+ /x)
+ {
+ 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 $opt eq '[';
+ $option{"$long=$arg"} = $short ? "$short $arg" : '';
+ }
+ else
+ {
+ $option{"$long"} = "$short";
+ }
+ }
+}
+
+foreach my $long (sort keys %option)
+{
+ printf "\@item %-40s \@tab %s\n", '@option{' . $long . '}', $option{$long};
+}
Property changes on: bison\src\bison\2.4.1\bison-2.4.1-src\build-aux\cross-options.pl
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « bison/src/bison/2.4.1/bison-2.4.1-src/build-aux/config.sub ('k') | bison/src/bison/2.4.1/bison-2.4.1-src/build-aux/depcomp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698