WG15 Defect Report Ref: 9945-2-138
Topic: regex

This is an approved interpretation of 9945-2:1993.


Last update: 1997-05-20



	Topic:			regex
	Relevant Sections:	Annex B, Section B.5

Defect Report:
	From: mark@mks.com (Mark Funkenhauser)
	Date: Wed, 16 Aug 1995 10:04:58 -0400 (EDT)

Subject: ISO/IEC 9945-2:1993

Dear Standards Board,

    I would like to an request official, binding interpretation
    from WG15 concerning the wording in 9945-2:1993 Annex B
    section B.5 C Binding for RE matching.

    Table B-10 - regcomp(), regexec() Return Values (line 424) says:

	    REG_BADRPT  ?, *, or + not preceded by valid RE

    Was is it intentional to omit '{' from this error message?
    The Error Code, meaning "bad repeater" implies that it is to used as a
    Error Code and Description when a repeater is not preceded by a valid
    regular expression. "{m,n}" is a repeat construct that can be preceded by
    an invalid RE. While REG_BADPAT is an Error Code that will cover this
    situation it is vague and not as useful as the return of REG_BADRPT.
    Currently the description of REG_BADRPT is confusing to users who read it
    when the error to be indicated is applicable to an interval expression
    repeater (particularly if the RE does contain other types of repeaters).

    A proposed solution is that line 424 be changed to read:

	    REG_BADRPT  ?, *, +, or { not preceded by valid RE

    Thank you for your attention to this matter.

Interpretation response

The standard clearly states the requirements for return values
for regcomp(), regexec() and conforming implementations must conform to this. 
However concerns have been raised about this which are
being referred to the sponsor. We are concerned not only about
{ in EREs but  \{ in BREs.


Forwarded to Interpretations group: Aug 16 1995
Recirculated for 30 day review: Oct 19 1995
Finalised: Nov 20 1995