Defect Report concerning: IEEE Std. 1003.2-1992, ISO/IEC 9945-2:1993 - Shell & Utilities
Clause: B.5.2
PASC Interpretation Ref: pasc-1003.2-45
Topic: pmatch rules


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  #45

 _____________________________________________________________________________


	Interpretation Number:	XXXX
	Topic:			pmatch rules
	Relevant Sections:	B.5.2
	Classification:	defect


Interpretation Request: (Defect Report)
-----------------------
(from Andrew Hume Doug McIlroy)


Issue F

	    ________________________________________

 [17] In B5.2, the meaning of lines 356-361 is unclear.

Proposed Solution:

     Replace the five rules with:

(1)  The nesting of substrings denoted by  nonnegative	off-
     sets  in	 pmatch	 shall be the same as the nesting of
     subexpressions in	pattern.

(2)  A substring denoted by nonnegative	offsets	in pmatch[i]
     shall be the last of all matches to subexpression	i.

(3)  The offsets in pmatch[i] shall be nonnegative if possi-
     ble  according to rules (1) and (2), otherwise the	off-
     sets in pmatch[i] shall be	-1.

Rationale:

     One of us	understood,  ``the  match  ...	reported  in
pmatch[i]  shall be ...	within the substring ... rather	than
the whole string,'' to mean that the  offsets  in  pmatch[i]
were  to  be  measured	relative  to  an origin	specified by
pmatch[j].  We now believe that	the rule  merely  says	that
reported  matches  must	 nest the same way as the subexpres-
sions.	The proposed solution captures this idea succinctly.
Rule  (5)  could  be  kept, but	nobody needs it, given lines
289-90.


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

The standard states the required behavior and
conforming implementations shall conform to this.

Concerns about the wording of this part of the standard have
been forwarded to the sponsor.  

Rationale for Interpretation:
-----------------------------
Interpretations cannot make substantive changes to the standard.
This may be considered for a future revision. 
 _____________________________________________________________________________