pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/pkglint/files Made the shell word parser acce...
details: https://anonhg.NetBSD.org/pkgsrc/rev/9fe08f3e932a
branches: trunk
changeset: 518082:9fe08f3e932a
user: rillig <rillig%pkgsrc.org@localhost>
date: Thu Aug 31 06:49:59 2006 +0000
description:
Made the shell word parser accept \$$ as a token. This avoids an
internal error showing up in benchmarks/netio.
diffstat:
pkgtools/pkglint/files/pkglint.pl | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (29 lines):
diff -r 8189e88dc9b5 -r 9fe08f3e932a pkgtools/pkglint/files/pkglint.pl
--- a/pkgtools/pkglint/files/pkglint.pl Thu Aug 31 06:39:11 2006 +0000
+++ b/pkgtools/pkglint/files/pkglint.pl Thu Aug 31 06:49:59 2006 +0000
@@ -1,5 +1,5 @@
#! @PERL@
-# $NetBSD: pkglint.pl,v 1.671 2006/08/30 05:41:19 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.672 2006/08/31 06:49:59 rillig Exp $
#
# pkglint - static analyzer and checker for pkgsrc packages
@@ -1813,7 +1813,8 @@
(?: '[^']*' # single quoted string
| \"(?:\\.|[^\"\\])*\" # double quoted string
| \`[^\`]*\` # backticks string
- | \\. # any escaped character
+ | \\\$\$ # an escaped dollar sign
+ | \\[^\$] # other escaped characters
| \$\{[^{}]+\} # make(1) variable
| \$\([^()]+\) # make(1) variable, $(...)
| \$[/\@<^] # special make(1) variables
@@ -4023,7 +4024,7 @@
$state = SWST_DQUOT;
} elsif ($rest =~ s/^\`//) {
$state = SWST_BACKT;
- } elsif ($rest =~ s/^\\[ !"#'\(\)*;\\^{|}]//) {
+ } elsif ($rest =~ s/^\\(?:[ !"#'\(\)*;\\^{|}]|\$\$)//) {
} elsif ($rest =~ s/^\$\$([0-9A-Z_a-z]+)//
|| $rest =~ s/^\$\$\{([0-9A-Z_a-z]+)\}//) {
my ($shvarname) = ($1);
Home |
Main Index |
Thread Index |
Old Index