bug-gnulib
[Top][All Lists]
Advanced

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

Re: "grep '\]'" warnings suggest a Gnulib DFA patch


From: Bruno Haible
Subject: Re: "grep '\]'" warnings suggest a Gnulib DFA patch
Date: Sat, 04 Jun 2022 05:02:04 +0200

Paul Eggert wrote:
> While testing, I discovered that master-branch grep's bootstrap script 
> contained a regular expression with '\]' that master-branch grep now 
> warns about. I fixed this portability bug in 'bootstrap' ...

Similarly, '\}' is undefined in EREs [1]. We probably also have a number of
occurrences of that...

In lib/regex-quote.c we have
/* Characters that are special in an ERE.  */
static const char ere_special[] = "$^.*[\\+?{}()|";

That should probably read
static const char ere_special[] = "$^.*[\\+?{()|";

Bruno

[1] 
https://pubs.opengroup.org/onlinepubs/9699919799.2018edition/basedefs/V1_chap09.html
    definition of SPEC_CHAR






reply via email to

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