Email List: Xaustin-group-lX
[All Lists]

BUG in XBD6

To: yyyyyyyyyyyyyy@xxxxxxxxxxxxx
Subject: BUG in XBD6
From: Glenn Fowler <yyy@xxxxxxxxxxxxxxxx>
Date: Tue, 30 Apr 2002 16:32:37 -0400 (EDT)
Organization: AT&T Labs Research
@ page 167 line 5889 section 9.1 objection omission [att.dgk-1]

Problem:
The standard uses the term "subpattern" without providing a definition.
Different assumptions about the meaning of this term have lead to
conflicting interpretations of the definition of "matched" starting at
line 5907.

A formal definition for "subpattern" can resolve the conflict.
Furthermore, a formal definition for "subexpression" can emphasize the
current implied distinction between "subpattern" and "subexpression".

The consequence of the Action: below is that it gives unambiguous
meaning to the paragraph starting at line 5907: "Consistent with the
whole match being the longest of the leftmost matches, each subpattern,
from left to right, shall match the longest possible string."

Note that this definition implies that a pattern is the concatenation
of all of its subpatterns from left to right.

Action:
Add these definitions after line 5889.

subpattern

A part of a pattern corresponding to the ERE grammar nonterminal
ERE_expression or the BRE grammar nonterminal simple_RE.  The
the longest applicable grammar production shall apply in the
recognition of ERE_expression and simple_RE.  For example, the
ERE "(ab)c*" contains two subpatterns, "(ab)" and "c*".
The ERE alternation rule (9.4.7) shall be applied before
subpatterns are identified.

subexpression

An ERE subpattern of the form "'(' extended_reg_exp ')'" or a
BRE subpattern of the form
"Back_open_paren RE_expression Back_close_paren".  For
example, the ERE "((a)(b))(c*)" contains two subexpressions,
"((a)(b))" and "(c*)".  A subexpression may contain other
subexpressions; this is referred to as nesting.

-- David Korn <yyy@xxxxxxxxxxxxxxxx> AT&T Labs Research, Florham Park NJ --
-- Glenn Fowler <yyy@xxxxxxxxxxxxxxxx> AT&T Labs Research, Florham Park NJ --

<Prev in Thread] Current Thread [Next in Thread>