Skip to content

Commit

Permalink
Editorial: Add missing _direction_ parameter in extended regexp patte…
Browse files Browse the repository at this point in the history
…rn evaluate semantics in annex b

Bugfix: When speccing lookbehind assertions (PR tc39#1029), a `direction` parameter were added, in particular to the `evaluate` semantics of Atom productions and to the  CharacterSetMatcher abstract operation. The ExtendedAtom productions found in Annex B were forgotten to be amended in the same way.
  • Loading branch information
claudepache committed Aug 21, 2019
1 parent d417f5d commit d46d5de
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -40500,17 +40500,17 @@ <h1>Pattern Semantics</h1>

<p>Assertion (<emu-xref href="#sec-assertion"></emu-xref>) evaluation rules for the <emu-grammar>Assertion :: `(` `?` `=` Disjunction `)`</emu-grammar> and <emu-grammar>Assertion :: `(` `?` `!` Disjunction `)`</emu-grammar> productions are also used for the |QuantifiableAssertion| productions, but with |QuantifiableAssertion| substituted for |Assertion|.</p>

<p>Atom (<emu-xref href="#sec-atom"></emu-xref>) evaluation rules for the |Atom| productions except for <emu-grammar>Atom :: PatternCharacter</emu-grammar> are also used for the |ExtendedAtom| productions, but with |ExtendedAtom| substituted for |Atom|. The following evaluation rules are also added:</p>
<p>Atom (<emu-xref href="#sec-atom"></emu-xref>) evaluation rules for the |Atom| productions except for <emu-grammar>Atom :: PatternCharacter</emu-grammar> are also used for the |ExtendedAtom| productions, but with |ExtendedAtom| substituted for |Atom|. The following evaluation rules, with parameter _direction_, are also added:</p>
<p>The production <emu-grammar>ExtendedAtom :: `\` [lookahead == `c`]</emu-grammar> evaluates as follows:</p>
<emu-alg>
1. Let _A_ be the CharSet containing the single character `\\` U+005C (REVERSE SOLIDUS).
1. Call CharacterSetMatcher(_A_, *false*) and return its Matcher result.
1. Call CharacterSetMatcher(_A_, *false*, _direction_) and return its Matcher result.
</emu-alg>
<p>The production <emu-grammar>ExtendedAtom :: ExtendedPatternCharacter</emu-grammar> evaluates as follows:</p>
<emu-alg>
1. Let _ch_ be the character represented by |ExtendedPatternCharacter|.
1. Let _A_ be a one-element CharSet containing the character _ch_.
1. Call CharacterSetMatcher(_A_, *false*) and return its Matcher result.
1. Call CharacterSetMatcher(_A_, *false*, _direction_) and return its Matcher result.
</emu-alg>

<p>CharacterEscape (<emu-xref href="#sec-characterescape"></emu-xref>) includes the following additional evaluation rule:</p>
Expand Down

0 comments on commit d46d5de

Please sign in to comment.