Skip to content

Commit

Permalink
Address PR feedback from @michaelficarra
Browse files Browse the repository at this point in the history
  • Loading branch information
rbuckton committed Sep 26, 2024
1 parent 0d2db20 commit 5a694e4
Showing 1 changed file with 25 additions and 16 deletions.
41 changes: 25 additions & 16 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -35458,8 +35458,15 @@ <h2>Syntax</h2>
`\` AtomEscape[?UnicodeMode, ?NamedCaptureGroups]
CharacterClass[?UnicodeMode, ?UnicodeSetsMode]
`(` GroupSpecifier[?UnicodeMode]? Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] `)`
`(?` RegularExpressionFlags `:` Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] `)`
`(?` RegularExpressionFlags `-` RegularExpressionFlags `:` Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] `)`
`(?` RegularExpressionModifiers `:` Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] `)`
`(?` RegularExpressionModifiers `-` RegularExpressionModifiers `:` Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] `)`

RegularExpressionModifiers ::
[empty]
RegularExpressionModifiers RegularExpressionModifier

RegularExpressionModifier :: one of
`i` `m` `s`

SyntaxCharacter :: one of
`^` `$` `\` `.` `*` `+` `?` `(` `)` `[` `]` `{` `}` `|`
Expand Down Expand Up @@ -35704,25 +35711,25 @@ <h1>Static Semantics: Early Errors</h1>
It is a Syntax Error if the MV of the first |DecimalDigits| is strictly greater than the MV of the second |DecimalDigits|.
</li>
</ul>
<emu-grammar>Atom :: `(?` RegularExpressionFlags `:` Disjunction `)`</emu-grammar>
<emu-grammar>Atom :: `(?` RegularExpressionModifiers `:` Disjunction `)`</emu-grammar>
<ul>
<li>
It is a Syntax Error if the source text matched by |RegularExpressionFlags| contains any code point other than `i`, `m`, or `s`, or if it contains the same code point more than once.
It is a Syntax Error if the source text matched by |RegularExpressionModifiers| contains the same code point more than once.
</li>
</ul>
<emu-grammar>Atom :: `(?` RegularExpressionFlags `-` RegularExpressionFlags `:` Disjunction `)`</emu-grammar>
<emu-grammar>Atom :: `(?` RegularExpressionModifiers `-` RegularExpressionModifiers `:` Disjunction `)`</emu-grammar>
<ul>
<li>
It is a Syntax Error if the source text matched by the first |RegularExpressionFlags| and the source text matched by the second |RegularExpressionFlags| are both empty.
It is a Syntax Error if the source text matched by the first |RegularExpressionModifiers| and the source text matched by the second |RegularExpressionModifiers| are both empty.
</li>
<li>
It is a Syntax Error if the source text matched by the first |RegularExpressionFlags| contains any code point other than `i`, `m`, or `s`, or if it contains the same code point more than once.
It is a Syntax Error if the source text matched by the first |RegularExpressionModifiers| contains the same code point more than once.
</li>
<li>
It is a Syntax Error if the source text matched by the second |RegularExpressionFlags| contains any code point other than `i`, `m`, or `s`, or if it contains the same code point more than once.
It is a Syntax Error if the source text matched by the second |RegularExpressionModifiers| contains the same code point more than once.
</li>
<li>
It is a Syntax Error if any code point in the source text matched by the first |RegularExpressionFlags| is also contained in the source text matched by the second |RegularExpressionFlags|.
It is a Syntax Error if any code point in the source text matched by the first |RegularExpressionModifiers| is also contained in the source text matched by the second |RegularExpressionModifiers|.
</li>
</ul>
<emu-grammar>AtomEscape :: `k` GroupName</emu-grammar>
Expand Down Expand Up @@ -36905,17 +36912,17 @@ <h1>
<emu-note>
<p>Parentheses of the form `(` |Disjunction| `)` serve both to group the components of the |Disjunction| pattern together and to save the result of the match. The result can be used either in a backreference (`\\` followed by a non-zero decimal number), referenced in a replace String, or returned as part of an array from the regular expression matching Abstract Closure. To inhibit the capturing behaviour of parentheses, use the form `(?:` |Disjunction| `)` instead.</p>
</emu-note>
<emu-grammar>Atom :: `(?` RegularExpressionFlags `:` Disjunction `)`</emu-grammar>
<emu-grammar>Atom :: `(?` RegularExpressionModifiers `:` Disjunction `)`</emu-grammar>
<emu-alg>
1. Let _addModifiers_ be the source text matched by |RegularExpressionFlags|.
1. Let _addModifiers_ be the source text matched by |RegularExpressionModifiers|.
1. Let _removeModifiers_ be the empty String.
1. Let _modifiedRer_ be UpdateModifiers(_rer_, CodePointsToString(_addModifiers_), _removeModifiers_).
1. Return CompileSubpattern of |Disjunction| with arguments _modifiedRer_ and _direction_.
</emu-alg>
<emu-grammar>Atom :: `(?` RegularExpressionFlags `-` RegularExpressionFlags `:` Disjunction `)`</emu-grammar>
<emu-grammar>Atom :: `(?` RegularExpressionModifiers `-` RegularExpressionModifiers `:` Disjunction `)`</emu-grammar>
<emu-alg>
1. Let _addModifiers_ be the source text matched by the first |RegularExpressionFlags|.
1. Let _removeModifiers_ be the source text matched by the second |RegularExpressionFlags|.
1. Let _addModifiers_ be the source text matched by the first |RegularExpressionModifiers|.
1. Let _removeModifiers_ be the source text matched by the second |RegularExpressionModifiers|.
1. Let _modifiedRer_ be UpdateModifiers(_rer_, CodePointsToString(_addModifiers_), CodePointsToString(_removeModifiers_)).
1. Return CompileSubpattern of |Disjunction| with arguments _modifiedRer_ and _direction_.
</emu-alg>
Expand Down Expand Up @@ -49689,6 +49696,8 @@ <h1>Regular Expressions</h1>
<emu-prodref name="Quantifier"></emu-prodref>
<emu-prodref name="QuantifierPrefix"></emu-prodref>
<emu-prodref name="Atom"></emu-prodref>
<emu-prodref name="RegularExpressionModifiers"></emu-prodref>
<emu-prodref name="RegularExpressionModifier"></emu-prodref>
<emu-prodref name="SyntaxCharacter"></emu-prodref>
<emu-prodref name="PatternCharacter"></emu-prodref>
<emu-prodref name="AtomEscape"></emu-prodref>
Expand Down Expand Up @@ -49852,8 +49861,8 @@ <h2>Syntax</h2>
`\` [lookahead == `c`]
CharacterClass[~UnicodeMode, ~UnicodeSetsMode]
`(` GroupSpecifier[~UnicodeMode]? Disjunction[~UnicodeMode, ~UnicodeSetsMode, ?NamedCaptureGroups] `)`
`(?` RegularExpressionFlags `:` Disjunction[~UnicodeMode, ~UnicodeSetsMode, ?NamedCaptureGroups] `)`
`(?` RegularExpressionFlags `-` RegularExpressionFlags `:` Disjunction[~UnicodeMode, ~UnicodeSetsMode, ?NamedCaptureGroups] `)`
`(?` RegularExpressionModifiers `:` Disjunction[~UnicodeMode, ~UnicodeSetsMode, ?NamedCaptureGroups] `)`
`(?` RegularExpressionModifiers `-` RegularExpressionModifiers `:` Disjunction[~UnicodeMode, ~UnicodeSetsMode, ?NamedCaptureGroups] `)`
InvalidBracedQuantifier
ExtendedPatternCharacter

Expand Down

0 comments on commit 5a694e4

Please sign in to comment.