bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dealing with character ranges in grep


From: Jim Meyering
Subject: Re: Dealing with character ranges in grep
Date: Mon, 27 Jun 2011 15:27:30 +0200

Paolo Bonzini wrote:
> On 06/15/2011 09:12 PM, Jim Meyering wrote:
>> However, backreferences force these tools to skip the DFA-based
>> optimization and resort to running the regexp code.  In that case,
>> there is a dichotomy.  Adding a backreference to a range-including
>> regexp would have the surprising consequence of changing how that range
>> is interpreted when the tool is built to use glibc's regexp code.
>>
>> Thus, if we go this route, we are effectively saying
>> that people who want self-consistent regex-handling
>> in our tools must build with --with-included-regex or end
>> up causing subtle problems.
>
> This is not true, the latest releases bail out not just for
> backreferences but also for ranges (MBCSETs).  This was done for
> performance reasons, but also to avoid exactly this problem.

Confirmed.  Thanks for the correction.
That'll teach me to rely on mere memory ;-)

This makes switching to RRI even easier.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]