Defect Report concerning: IEEE Std. 1003.2-1992, ISO/IEC 9945-2:1993 - Shell & Utilities
Clause: 2.8.3.3
PASC Interpretation Ref: pasc-1003.2-86
Topic: backreferences


This is an unapproved interpretation of PASC 1003.2-1992, ISO/IEC 9945-2:1993 - Shell & Utilities.

Use of the information contained in this unapproved document is at your own risk.

Last update: 20 April,2001


								1003.2-92  #86

 _____________________________________________________________________________

	Interpretation Number:	XXXX
	Topic:			backreferences
	Relevant Sections:	2.8.3.3


Interpretation Request: (Defect Report)
-----------------------


I would like to request an official, binding interpretation from the
IEEE concerning the following point in IEEE Std 1003.2-1992 (POSIX.2).

In the description of backreferences in POSIX.2 subclause 2.8.3.3,
the standard states (in part):

    The backreference expression \n shall match the same
    (possibly empty) string of characters as was matched by a
    subexpression enclosed between ( and ) preceding
    the n.  The character n shall be a digit from 1 through 9,
    specifying the n'th subexpression...

My question revolves around the use of the word "shall" in the last
sentence.  Is thia a restriction on applications, or on
implementations?  In the former case, an expression with a
backreference such as \0 would be nonportable, having unspecified
behavior.  In the latter case, it would have to be treated as invalid
by any conforming implementation.

Thank you for your attention to this matter.


IEEE Interpretation for 1003.2-1992
-----------------------------------

"The character n shall be a digit from 1 throught 9, ..." is a requirement 
for a standard conforming application.  The standard does not require 
that an implementation return an error if another value such as 0 is used.

The standard clearly states behavior for backreference expressions and 
conforming implementations must conform to this.

Rationale
-------------
None.

Forwarded to Interpretations group: 17 Nov 94
Response received: Feb 10 1995
Proposed Resoln forwarded: 13th Feb 1995
Finalised: March 28th 1995
 _____________________________________________________________________________