pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/pkglint/files Fixed the regular expression ag...
details: https://anonhg.NetBSD.org/pkgsrc/rev/62691fa61b34
branches: trunk
changeset: 516152:62691fa61b34
user: rillig <rillig%pkgsrc.org@localhost>
date: Sat Jul 15 07:31:45 2006 +0000
description:
Fixed the regular expression again. Now the stack limits are 1024 kB for
wip/gforge and 256 kB for databases/pgadmin3.
diffstat:
pkgtools/pkglint/files/pkglint.pl | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (21 lines):
diff -r 22155e41e93a -r 62691fa61b34 pkgtools/pkglint/files/pkglint.pl
--- a/pkgtools/pkglint/files/pkglint.pl Sat Jul 15 07:02:52 2006 +0000
+++ b/pkgtools/pkglint/files/pkglint.pl Sat Jul 15 07:31:45 2006 +0000
@@ -1,5 +1,5 @@
#! @PERL@
-# $NetBSD: pkglint.pl,v 1.647 2006/07/15 06:57:51 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.648 2006/07/15 07:31:45 rillig Exp $
#
# pkglint - static analyzer and checker for pkgsrc packages
@@ -1756,7 +1756,9 @@
use constant regex_shellcmd => qr"^\t(.*)$";
use constant regex_unresolved => qr"\$\{";
use constant regex_validchars => qr"[\011\040-\176]";
-use constant regex_varassign => qr"^([-*+A-Z_a-z0-9.\${}\[]+?)\s*(=|\?=|\+=|:=|!=)\s*((?:\\#|[^#]+)*?)(?:\s*(#.*))?$";
+# Note: the following regular expression looks more complicated than
+# necessary to avoid a stack overflow in the Perl interpreter.
+use constant regex_varassign => qr"^([-*+A-Z_a-z0-9.\${}\[]+?)\s*(=|\?=|\+=|:=|!=)\s*((?:[^\\#\s]+|\s+?|(?:\\#)+|\\)*?)(?:\s*(#.*))?$";
use constant regex_sh_varassign => qr"^([A-Z_a-z][0-9A-Z_a-z]*)=";
# The following "constants" are often used in contexts where
Home |
Main Index |
Thread Index |
Old Index