The following issue has been SUBMITTED. 
====================================================================== 
https://austingroupbugs.net/view.php?id=1877 
====================================================================== 
Reported By:                geoffclare
Assigned To:                
====================================================================== 
Project:                    1003.1(2024)/Issue8
Issue ID:                   1877
Category:                   Base Definitions and Headers
Type:                       Error
Severity:                   Editorial
Priority:                   normal
Status:                     New
Name:                       Geoff Clare 
Organization:               The Open Group 
User Reference:              
Section:                    9.1 
Page Number:                179 
Line Number:                6335-6388 
Interp Status:              --- 
Final Accepted Text:         
====================================================================== 
Date Submitted:             2024-11-19 12:10 UTC
Last Modified:              2024-11-19 12:10 UTC
====================================================================== 
Summary:                    ISO editors Issue 8 comment 068
Description: 
In their comment 068 on Issue 8 the ISO editors pointed out that
definitions of terms should all be in chapter 3; there should not be
additional definitions for REs in XBD 9.1. The Austin Group's response was
that a change would be considered for the next TC.

Currently 9.1 is a mixture of definitions and behavioural requirements. 
The requirements should not move to chapter 3; they should either stay in
9.1 and the section be renamed appropriately, or move elsewhere in chapter
9.

When some of the definitions are moved to the wider context, they will need
updating to account for that. For example, "escape character" is used in
several contexts.

Some of the definitions seem unnecessary or have problems and I do not
believe any changes to chapter 3 should be made for
them:<blockquote>"entire regular expression": this is already defined in
3.124.

"matched": this already has a definition in 3.199, and the extra text in
the 9.1 "definition" contains requirements.

"BRE (ERE) matching a single character": this seems unnecessary given the
technical descriptions in 9.3.1 and 9.4.1, and the definition's text
doesn't match the term since it also talks about matching a collating
element.

"BRE (ERE) matching multiple characters": this seems unnecessary given the
technical descriptions in 9.3.6 and 9.4.6.

"invalid": there is no definition of the term, just a statement about its
use plus some requirements.</blockquote>
Another issue with the current definitions in 9.1 is that the "escape
sequence" entry defines both "escape sequence" and (within the text)
"escape character"; both terms should be added to XBD 3.

The changes to 9.1 will necessitate some tweaks to places elsewhere in the
standard that cross-reference it.

Note that bug https://austingroupbugs.net/view.php?id=1857 moves the
requirements from the "matched"
definition from 9.1 to 9.2, but the desired action here moves them back
(otherwise there would be nothing left in 9.1, and removing 9.1 would alter
the later familiar section numbers).

Desired Action: 
After page 49 line 1539 section 3.127, add:<blockquote><b>3.128 Escape
Character</b><blockquote>A character that, in certain circumstances and
when not itself escaped, modifies the interpretation of the immediately
following character by ``escaping'' that character.

<small><b>Note:</b> Although the usual effect of the escape character is to
remove any special meaning from the character it escapes, that is not
always the case. For example, in a BRE escaping the digits '1' to '9' gives
them a special meaning. (See [xref to 9.3.2 BRE Ordinary
Characters].)</small></blockquote><b>3.129 Escape
Sequence</b><blockquote>The escape character immediately followed by any
single character, which is thereby ``escaped''.</blockquote></blockquote>
After page 58 line 1798 section 3.184, add:<blockquote><b>3.185
Leftmost</b><blockquote>Closest to the beginning of a sequence of items,
such as characters in a string or symbols in a [xref to <i>yacc</i>]
rule.</blockquote></blockquote>
On page 179 line 6335-6348 section 9.1, after applying bug 1857
change:<blockquote><b>9.1 Regular Expression Definitions</b><blockquote>For
the purposes of this section, the following definitions shall apply:

<b>entire regular expression</b>

[...]

<b>matched</b><blockquote>A sequence of zero or more characters shall be
said to be matched by a BRE or ERE when the characters in the sequence
correspond to a sequence of characters defined by the pattern. The matching
process is described in [xref to
9.2].</blockquote></blockquote></blockquote>to:<blockquote><b>9.1 Regular
Expression Matching</b></blockquote>and move the text that bug 1857 moved
from "matched" to 9.2, as updated by that bug, back into 9.1.

On page 180 line 6373-6381 section 9.1, delete:<blockquote><b>BRE (ERE)
matching a single character</b>

[...]

<b>invalid</b></blockquote>
On page 180 line 6382-6388 section 9.1, move the text of the current
"invalid" definition to become a new paragraph at the end of 9.2 Regular
Expression General Requirements (after page 191 line 6413).

After page 191 line 6390 section 9.2, add a paragraph:<blockquote>The
escape character in regular expressions shall be a <backslash> that is
neither in a bracket expression nor itself escaped.</blockquote>
On page 2616 line 85645 section awk, change:<blockquote>defined by the term
matched in [xref to XBD Section 9.1]</blockquote>to:<blockquote>defined by
[xref to XBD Section 9.1]</blockquote>
On page 2817 line 93403 section ed, and
page 2825 line 93720 section ed, and
page 2867 line 95359 section ex, and
page 2876 line 95690 section ex, and
page 3356 line 114103 section sed, and
page 3359 line 114244 section sed, change:<blockquote>escape sequence (see
[xref to XBD Section 9.1])</blockquote>to:<blockquote>escape sequence (see
[xref to XBD Section 3.129])</blockquote>
On page 3371 line 114747 section sh, change:<blockquote>Typing an escape
character shall switch <i>sh</i> into command
mode</blockquote>to:<blockquote>Typing an <ESC> character shall switch
<i>sh</i> into command mode</blockquote>
On page 3709 line 127351 section A.9.1, change:<blockquote><b>A.9.1 Regular
Expression Definitions</b></blockquote>to:<blockquote><b>A.9.1 Regular
Expression Matching</b></blockquote>

====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2024-11-19 12:10 geoffclare     New Issue                                    
2024-11-19 12:10 geoffclare     Name                      => Geoff Clare     
2024-11-19 12:10 geoffclare     Organization              => The Open Group  
2024-11-19 12:10 geoffclare     Section                   => 9.1             
2024-11-19 12:10 geoffclare     Page Number               => 179             
2024-11-19 12:10 geoffclare     Line Number               => 6335-6388       
2024-11-19 12:10 geoffclare     Interp Status             => ---             
======================================================================


  • [1003.1(20... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [1003... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [1003... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [1003... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [1003... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [1003... Austin Group Issue Tracker via austin-group-l at The Open Group

Reply via email to