This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5a279aa
)
regen/regcomp.pl: Allow ';' in comments
author
Karl Williamson
<public@khwilliamson.com>
Fri, 6 Jul 2012 17:31:11 +0000
(11:31 -0600)
committer
Karl Williamson
<public@khwilliamson.com>
Wed, 25 Jul 2012 03:13:45 +0000
(21:13 -0600)
If a comment contained a semi-colon, the regular expression's greedy
quantifier would think the portion of the comment before it was part of
the data to be processed
regen/regcomp.pl
patch
|
blob
|
blame
|
history
diff --git
a/regen/regcomp.pl
b/regen/regcomp.pl
index
69643ca
..
eef5533
100644
(file)
--- a/
regen/regcomp.pl
+++ b/
regen/regcomp.pl
@@
-34,7
+34,7
@@
while (<DESC>) {
next;
}
unless ($lastregop) {
- ($name[$ind], $desc, $rest[$ind]) = /^(\S+)\s+([^\t]+)\s*;\s*(.*)/;
+ ($name[$ind], $desc, $rest[$ind]) = /^(\S+)\s+([^\t]+
?
)\s*;\s*(.*)/;
($type[$ind], $code[$ind], $args[$ind], $flags[$ind], $longj[$ind])
= split /[,\s]\s*/, $desc;
++$ind;