IEEE Standards Interpretations for IEEE Std 1003.2™-1992 IEEE Standard for Information Technology--Portable Operating System Interfaces (POSIX®)--Part 2: Shell and Utilities
Copyright © 1996 by the Institute of Electrical and Electronics Engineers, Inc. 3 Park Avenue New York, New York 10016-5997 USA All Rights Reserved.
Interpretations are issued to explain and clarify the intent of a standard and do not constitute an alteration to the original standard. In addition, interpretations are not intended to supply consulting information. Permission is hereby granted to download and print one copy of this document. Individuals seeking permission to reproduce and/or distribute this document in its entirety or portions of this document must contact the IEEE Standards Department for the appropriate license. Use of the information contained in this document is at your own risk.
IEEE Standards Department, Copyrights and Permissions, 445 Hoes Lane, Piscataway, New Jersey 08855-1331, USA
Interpretation Request #128
Topic: REs Relevant Clauses: 2.8
The standard as written appears to state that "a)b" is a legitimate and conforming ERE, because right parenthesis is special only in the presence of an outstanding unmatched left parenthesis. This is completely inconsistent with historical practice, which has always declared an unmatched right parenthesis to be an error. This change adds no useful functionality, and indeed interferes with certain significant uses of EREs (which depend on parentheses being balanced so that user- supplied EREs can safely be embedded in larger ones by being wrapped in parentheses). Was this change deliberate, or was this an accidental mistake which should be corrected? Should a correction be indicated, the relevant lines in 1003.2- 1992 are 3066-3067 and 3221-3222. A suitable correction would be to delete all these lines and add right parenthesis to the list of unconditionally- special characters in line 3062.
The standard clearly states the behavior for parentheses in regular expressions, and conforming implementations must conform to this, even if it does not match some historic practices. However, concerns have been raised about this which are being forwarded to the sponsor.
Rationale for Interpretation