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: Jim Meyering
Subject: Re: "grep '\]'" warnings suggest a Gnulib DFA patch
Date: Fri, 3 Jun 2022 21:33:10 -0700

On Fri, Jun 3, 2022 at 8:09 PM Bruno Haible <bruno@clisp.org> wrote:
> Paul Eggert asked:
> > So, what do you think of the idea of not warning for this particular
> > stray backslash? Proposed Gnulib patch attached, with the idea of
> > propagating this into GNU grep before its upcoming release. I haven't
> > installed this.
>
> Warning about undefined behaviour is good.
>
> But when I think about the thousands of people who use regular expressions
> out there. How would they remember that in parentheses both should be
> backslash-escaped in EREs
>     \(   \)
> but brackets and braces are asymmetric
>     \[   ]
>     \{   }
> Even if the warning message you install in grep has 3 or 5 lines and goes
> into all details, we are not serving the community if we force them to adhere
> to asymmetric rules, where up to now they could use symmetric rules.

I agree with Bruno.



reply via email to

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