Skip to content

Commit

Permalink
Editorial: add more lookahead-restrictions to NotEscapeSequence
Browse files Browse the repository at this point in the history
Specifically, add a [lookahead <! HexDigit] restriction to the
two right-hand sides:
    u { NotCodePoint
    u { CodePoint
to force them to consume all the HexDigits there.
Otherwise, the NotEscapeSequence could end 'early',
causing 'TemplateCharacters' to be ambiguous.
  • Loading branch information
jmdyck committed Dec 21, 2017
1 parent fa82e04 commit 58c4083
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -10702,8 +10702,8 @@ <h2>Syntax</h2>
`u` HexDigit HexDigit [lookahead &lt;! HexDigit]
`u` HexDigit HexDigit HexDigit [lookahead &lt;! HexDigit]
`u` `{` [lookahead &lt;! HexDigit]
`u` `{` NotCodePoint
`u` `{` CodePoint [lookahead != `}`]
`u` `{` NotCodePoint [lookahead &lt;! HexDigit]
`u` `{` CodePoint [lookahead &lt;! HexDigit] [lookahead != `}`]

NotCodePoint ::
HexDigits [&gt; but only if MV of HexDigits &gt; 0x10FFFF ]
Expand Down Expand Up @@ -10845,10 +10845,10 @@ <h1>Static Semantics: TV and TRV</h1>
The TRV of <emu-grammar>NotEscapeSequence :: `u` `{` [lookahead &lt;! HexDigit]</emu-grammar> is the sequence consisting of the code unit 0x0075 (LATIN SMALL LETTER U) followed by the code unit 0x007B (LEFT CURLY BRACKET).
</li>
<li>
The TRV of <emu-grammar>NotEscapeSequence :: `u` `{` NotCodePoint</emu-grammar> is the sequence consisting of the code unit 0x0075 (LATIN SMALL LETTER U) followed by the code unit 0x007B (LEFT CURLY BRACKET) followed by the code units of the TRV of |NotCodePoint|.
The TRV of <emu-grammar>NotEscapeSequence :: `u` `{` NotCodePoint [lookahead &lt;! HexDigit]</emu-grammar> is the sequence consisting of the code unit 0x0075 (LATIN SMALL LETTER U) followed by the code unit 0x007B (LEFT CURLY BRACKET) followed by the code units of the TRV of |NotCodePoint|.
</li>
<li>
The TRV of <emu-grammar>NotEscapeSequence :: `u` `{` CodePoint [lookahead != `}`]</emu-grammar> is the sequence consisting of the code unit 0x0075 (LATIN SMALL LETTER U) followed by the code unit 0x007B (LEFT CURLY BRACKET) followed by the code units of the TRV of |CodePoint|.
The TRV of <emu-grammar>NotEscapeSequence :: `u` `{` CodePoint [lookahead &lt;! HexDigit] [lookahead != `}`]</emu-grammar> is the sequence consisting of the code unit 0x0075 (LATIN SMALL LETTER U) followed by the code unit 0x007B (LEFT CURLY BRACKET) followed by the code units of the TRV of |CodePoint|.
</li>
<li>
The TRV of <emu-grammar>DecimalDigit :: one of `0` `1` `2` `3` `4` `5` `6` `7` `8` `9`</emu-grammar> is the SV of the |SourceCharacter| that is that single code point.
Expand Down

0 comments on commit 58c4083

Please sign in to comment.