GNU bug report logs - #16481
dfa.c and Rational Range Interpretation

Previous Next

Package: grep;

Reported by: Aharon Robbins <arnold <at> skeeve.com>

Date: Fri, 17 Jan 2014 13:41:01 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Paolo Bonzini <bonzini <at> gnu.org>
To: Paul Eggert <eggert <at> cs.ucla.edu>, Aharon Robbins <arnold <at> skeeve.com>,  16481 <at> debbugs.gnu.org
Subject: bug#16481: dfa.c and Rational Range Interpretation
Date: Mon, 10 Feb 2014 00:18:40 +0100
Il 17/01/2014 23:43, Paul Eggert ha scritto:
>> > I do think that gawk's code is the correct thing to be doing for RRI.
> I agree, and installed the second patch enclosed below to
> implement this.  This patch also includes some documentation
> changes -- if you have a bit of time to review them I'd
> appreciate it.

Please revert commit 1078b64302bbf5c0a46635772808ff7f75171dbc.

The correct course of action for grep is to defer range interpretation 
to regex, because otherwise you can get mismatches between regexes with 
backreferences and those without.

For example, [A-Z]. will use RRI but ([A-Z])\1 won't, with the confusing 
result that the first regex won't match a superset of the language 
described by the second regex.

For this reason, if you want to have RRI, then you need to make sure 
that you compile --with-included-regex.

Paolo




This bug report was last modified 11 years and 132 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.