archives

« Bugzilla Issues Index

#4042 — B.1.4: overdone grammatical parameters


In B.1.4 "Regular Expressions Patterns",
under "Syntax",
the last production is:
ClassEscape[U] ::
[+U] DecimalEscape
[+U] CharacterEscape[U]
[+U] CharacterClassEscape
[~U] DecimalEscape
b
[~U] CharacterClassEscape
[~U] CharacterEscape

It seems like there's no reason to have
[+U] DecimalEscape
and
[~U] DecimalEscape
Replace with just:
DecimalEscape

Similarly for:
[+U] CharacterClassEscape
[~U] CharacterClassEscape

Moreover, the pair
[+U] CharacterEscape[U]
[~U] CharacterEscape
is presumably equivalent to just
CharacterEscape[?U]


Leaving just:
ClassEscape[U] ::
DecimalEscape
b
CharacterEscape[?U]
CharacterClassEscape

(i.e., same as the production in 21.2.1, except for the "[+U]-" rhs.)


the grammar in B.1.4 uses the ordering of productions for disambiguation (see the first paragraph of B.1.4)

The occurrences on [+U] and [~U] prefixes gives the corresponding RHS rules different disambiguation priorities.


Ah, right.
Resolved invalid then.