Date: Fri, 14 Jun 2002 12:20:19 -0400 (EDT) From: Garrett Wollman <wollman@lcs.mit.edu> To: Maxim Sobolev <sobomax@FreeBSD.org> Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: ports/Mk bsd.port.mk Message-ID: <200206141620.g5EGKJBj014342@khavrinen.lcs.mit.edu> In-Reply-To: <3D09DB11.8362727A@FreeBSD.org> References: <20020614033017.I8221-100000@blues.jpj.net> <3D09DB11.8362727A@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
<<On Fri, 14 Jun 2002 15:01:21 +0300, Maxim Sobolev <sobomax@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200206141620.g5EGKJBj014342>