Re: CFT: BSD-licensed grep [Fwd: cvs commit: ports/textproc/bsdgrep Makefile distinfo]

From: Gabor Kovesdan <gabor_at_FreeBSD.org>
Date: Mon, 07 Jul 2008 22:56:33 +0200
Kris Kennaway escribió:
> Andrey Chernov wrote:
>> On Mon, Jul 07, 2008 at 10:06:31PM +0200, Kris Kennaway wrote:
>>> What regression suites do other implementations have?  e.g. the GNU 
>>> textutils.
>>
>> They basically have regex tests, but nothing locale specific, since 
>> locale ordering is different from platform to platform (until Unicode 
>> Collation Algorithm will win).
>>
>
> OK.  Well at least it is a start - passing those existing regression 
> tests should be a goal.
Well, it seems you have missed the first nits of the discussion. GNU 
grep has some regression test, which doesn't pass completely itself 
either. :) I've mentioned here that I used those tests to find out what 
incompatible options are there. Unfortunately, I have to say that BSD 
grep won't pass all of those, because GNU allows some non-standard 
regexes, which are rejected by our libc-regex library, like for example 
(a|) is not standard because it has an empty subexpression. First, I 
tried to pre-edit such expression in the code. It was ugly enough but I 
thought: "Ok, this code is pretty ugly, but compatibility is important, 
maybe we can later revise and/or change our regexp library and get rid 
of these snippets." Later, when Andrey pointed it out, I realized that 
my workarounds adressed those incompatibilities but didn't work 
completely, they broke compatibility at other places, thus I just 
removed them, because it was not that easy to fix. The version that I 
sent you for the portbuild test, doesn't have those workarounds. The 
regression test helped though to fix other compatibility issues, like 
return values. All of these trivial things are supposed to be compatible 
now, the only exceptions are the non-standard regexes. That's why I'm so 
curious about the results. If they are inacceptable, we can try to build 
BSD grep with the GNU regexp lib (it's in the tree, as Pedro F. Giffuni 
pointed it out). It doesn't work by just linking with that library, so 
it will need more work and investigation then, not speaking about that 
GNU regex should go one day...

Regards,
Gábor
Received on Mon Jul 07 2008 - 18:56:38 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:32 UTC