summaryrefslogtreecommitdiff
path: root/regen_perly.pl
diff options
context:
space:
mode:
authorDagfinn Ilmari Mannsåker <ilmari@ilmari.org>2020-08-17 20:27:51 +0100
committerDagfinn Ilmari Mannsåker <ilmari@ilmari.org>2020-08-17 20:27:51 +0100
commitaf4e95752ae04f8f6f824b9da507287a3006618f (patch)
tree5108c510c1dba09da16efd2e2c3cf5375110cdd4 /regen_perly.pl
parent4fbd738b1aaec4daae09b2d60b12dc481db13c06 (diff)
downloadperl-af4e95752ae04f8f6f824b9da507287a3006618f.tar.gz
regen_perly.pl: remove extraneous comments from bison 3.x
The script alrady stripped out comments from bison 2.4 on the form /* Line 1234 of yacc.c */ But bison 3.0 changed the comment syntax to /* yacc.c:1234 */ Let's remove those too.
Diffstat (limited to 'regen_perly.pl')
-rw-r--r--regen_perly.pl3
1 files changed, 3 insertions, 0 deletions
diff --git a/regen_perly.pl b/regen_perly.pl
index 7c2dc8c12c..044fd28393 100644
--- a/regen_perly.pl
+++ b/regen_perly.pl
@@ -234,6 +234,9 @@ sub extract {
# Remove extraneous comments from bison 2.4
$actlines =~ s!\s* /\* \s* Line \s* \d+ \s* of \s* yacc\.c \s* \*/!!gx;
+ # Remove extraneous comments from bison 3.x
+ $actlines =~ s!\s* /\* \s* yacc\.c : \d+ \s* \*/!!gx;
+
# C<#line 188 "perlytmp.c"> gets picked up by make depend, so remove them.
$actlines =~ s/^#line \d+ "\Q$tmpc_file\E".*$//gm;