[Top][All Lists]

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

Re: sed POSIX compatibility regarding '|' in regular expressions

From: Paul Eggert
Subject: Re: sed POSIX compatibility regarding '|' in regular expressions
Date: Thu, 14 Dec 2006 14:17:04 -0800
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

Paolo Bonzini <address@hidden> writes:

>> Bug #1: The --posix option fails to turn off this GNU extension.
> This is not a bug, as Eric already explained.

But the sed documentation says that --posix "disables all the
extensions that this manual documents, including additional commands."
It goes on to explain that setting POSIXLY_CORRECT disables only the
extensions that are incompatible with POSIX.

So it seems to me that it is a bug, in the sense that "sed --posix" is
not properly diagnosing the attempted use of this extension.

However, fixing it will not be trivial, as there's no hook for
this in the regex module.

Perhaps the sed documentation should be adjusted to say that "sed
--posix" is not perfect; i.e., some uses of extensions are not
diagnosed.  I think it'd be hard to diagnose _all_ uses of extensions.

reply via email to

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