diff options
author | Karl Williamson <khw@khw-desktop.(none)> | 2010-07-19 21:51:32 -0600 |
---|---|---|
committer | Rafael Garcia-Suarez <rgs@consttype.org> | 2010-07-29 12:10:18 +0200 |
commit | e32a881648677e322dff2b672a89f19c7d31b263 (patch) | |
tree | 64ae6ab5b14e817d4656f5b9eff58634d4d1dd7b /ext | |
parent | 6a080ccd8f8cbc284cf83658040e98d0247adca6 (diff) | |
download | perl-e32a881648677e322dff2b672a89f19c7d31b263.tar.gz |
ext/B/defsubs_h.PL: teach to allow exprs with <<
Allow #defines which have left shift operators in them.
Diffstat (limited to 'ext')
-rw-r--r-- | ext/B/defsubs_h.PL | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/B/defsubs_h.PL b/ext/B/defsubs_h.PL index f8fa1edc4f..d8e1439f7d 100644 --- a/ext/B/defsubs_h.PL +++ b/ext/B/defsubs_h.PL @@ -84,7 +84,11 @@ foreach my $tuple (['op.h'],['cop.h'],['regexp.h','RXf_']) open(OPH,"$path") || die "Cannot open $path:$!"; while (<OPH>) { - doconst($1) if (/#define\s+($pfx\w+)\s+([\(\)\|\dx]+)\s*(?:$|\/\*)/); + doconst($1) if (/ \#define \s+ ( $pfx \w+ ) \s+ + ( [()|\dx]+ # Parens, '|', digits, 'x' + | \(? \d+ \s* << .*? # digits left shifted by anything + ) \s* (?: $| \/ \* ) # ending at comment or $ + /x); } close(OPH); } |