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


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

	Class: Editorial defect


This will be forwarded to the IEEE for incorporation into a future 
errata sheet for the document, as well as an IEEE interpretations
publication, and will be also made available on-line on the IEEE 
SPAsystem.
 _____________________________________________________________________________


	Interpretation Number:	(to be assigned by the IEEE)
	Topic:			sh
	Relevant Sections:	3.13.1


Interpretation Request: (Defect Report)
-----------------------
 
          In Section 3.13.1 - Patterns Matching  a  Single  Character, 
          the standard states that ``special characters can be escaped 
          to remove their special meaning by  preceding  them  with  a 
          <backslash>.''  [Draft 12  of  IEEE  Std  1003.2-1992  (July 
          1992), p. 157, lines 1397-1399] The standard  defines  these 
          ``special  characters''  to  be  ``?,''  ``*,''  and  ``[.'' 
          [Ibid., p. 157, lines 1386-1389] 
 
          Thus, it appears that special characters within []  are  not 
          within the scope of the statement on lines 1397-1399.  Thus, 
          the statement in Section 2.8.3.2, ``[t]he special characters 
          .  *  [  \ (period, asterisk, left-bracket,  and  backslash, 
          respectively) shall lose  their  special  meaning  within  a 
          bracket expression'' [Ibid.,  pp  82-83.  lines  2892-2895], 
          presumably holds. 
 
          This implies to  me  that  the  pattern  bracket  expression 
          ``[a\-z]''  should  match  the  letter  a,  and  <backslash> 
          through  z,  as  it  does  in  regular  expressions.    This 
          disagrees  with  historical  practice,  where  this  pattern 
          matches a, -, and z. Is the  intent  to  disable  historical 
          practice, or can we interpret  lines  1397-1399  as  reading 
          ``...  special  characters,  including  special   characters 
          within a pattern bracket expression?'' 
 

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


The standard is specific in its requirement that RE behavior apply to
bracket expressions with the one noted exception. The example in the
request does not fulfill this exception, hence it must be interpreted
according to the RE rules (2.8.3.2). Concern over the wording of this
section has been forwarded to the Sponsors of the standard.

Rationale for Interpretation:
-----------------------------
None.
 _____________________________________________________________________________