From owner-cvs-all Fri Jun 14 9:20:26 2002 Delivered-To: cvs-all@freebsd.org Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by hub.freebsd.org (Postfix) with ESMTP id 74A4337B429; Fri, 14 Jun 2002 09:20:20 -0700 (PDT) Received: from khavrinen.lcs.mit.edu (localhost [IPv6:::1]) by khavrinen.lcs.mit.edu (8.12.3/8.12.3) with ESMTP id g5EGKJDK014345; Fri, 14 Jun 2002 12:20:19 -0400 (EDT) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.12.3/8.12.3/Submit) id g5EGKJBj014342; Fri, 14 Jun 2002 12:20:19 -0400 (EDT) (envelope-from wollman) Date: Fri, 14 Jun 2002 12:20:19 -0400 (EDT) From: Garrett Wollman Message-Id: <200206141620.g5EGKJBj014342@khavrinen.lcs.mit.edu> To: Maxim Sobolev Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: ports/Mk bsd.port.mk In-Reply-To: <3D09DB11.8362727A@FreeBSD.org> References: <20020614033017.I8221-100000@blues.jpj.net> <3D09DB11.8362727A@FreeBSD.org> Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG < said: > I should admit that it looks like the most realistic plan out there. > The main problems are with $ and @ characters, which have a special > meaning for perl but no such meaning for sed(1), so that any, even > simple, regexp that uses those chars *could not* be modified to work > uniformly with both perl and sed. It's even worse than that -- the definition of how matching works in Perl is completely different from POSIX matching (greedy NFA versus leftmost-longest), such that even in cases where the syntax is identical the semantics can be completely different. (And Perl and POSIX syntaxes are rarely identical; viz., the syntax for subexpressions.) One way to fix this particular conundrum would be to import libpcre and then add a -W flag to sed telling it to use Perl-compatible REs rather than POSIX REs. (Since the Perl syntax and semantics are trivial to understand and generate by comparison with the still-unresolved-after-fifteen-years POSIX specification, this would not be a bad option to have available in general.) -GAWollman To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message