diff --git a/rendered_spec.html b/rendered_spec.html
index 864ab88a216..1bc39b21484 100644
--- a/rendered_spec.html
+++ b/rendered_spec.html
@@ -47,7 +47,7 @@
-
Draft ECMA-262 / July 31, 2019
+
Draft ECMA-262 / August 02, 2019
ECMAScript® 2020 Language Specification
@@ -12484,12 +12484,11 @@
Syntax
EscapeSequence::CharacterEscapeSequence
- 0[lookahead ∉ DecimalDigit]
+ LegacyOctalEscapeSequence
HexEscapeSequence
UnicodeEscapeSequence
-
-
A conforming implementation, when processing strict mode code, must not extend the syntax of EscapeSequence to include LegacyOctalEscapeSequence as described in B.1.2.
-
+
+
CharacterEscapeSequence::SingleEscapeCharacter
NonEscapeCharacter
@@ -12505,6 +12504,18 @@ Syntax
x
u
+
+ LegacyOctalEscapeSequence::OctalDigit[lookahead ∉ OctalDigit]
+ ZeroToThreeOctalDigit[lookahead ∉ OctalDigit]
+ FourToSevenOctalDigit
+ ZeroToThreeOctalDigitOctalDigit
+
+
+ ZeroToThree::one of0123
+
+
+ FourToSeven::one of4567
+
HexEscapeSequence::xHexDigitHexDigit
@@ -12520,8 +12531,26 @@ Syntax
<LF> and <CR> cannot appear in a string literal, except as part of a LineContinuation to produce the empty code points sequence. The proper way to include either in the String value of a string literal is to use an escape sequence such as \n
or \u000A
.
+ Supplemental Syntax
+ When processing an instance of the production
+ LegacyOctalEscapeSequence::OctalDigit
+ the following production is used to refine the interpretation of LegacyOctalEscapeSequence.
+
+ StrictZeroEscapeSequence::0[lookahead ∉ DecimalDigit]
+
+
+
+ 11.8.4.1Static Semantics: Early Errors
+
+ EscapeSequence::LegacyOctalEscapeSequence
+
+
+
+
- 11.8.4.1Static Semantics: StringValue
+ 11.8.4.2Static Semantics: StringValue
StringLiteral::"DoubleStringCharactersopt"
@@ -12533,8 +12562,8 @@ 11.8.4.1Static Semantics: StringValue
-
- 11.8.4.2Static Semantics: SV
+
+ 11.8.4.3Static Semantics: SV
A string literal stands for a value of the String type. The String value (SV) of the literal is described in terms of code unit values contributed by the various parts of the string literal. As part of this process, some Unicode code points within the string literal are interpreted as having a mathematical value (MV), as described below or in 11.8.3.
+
+
+ 11.8.4.4Static Semantics: MV
+
+
@@ -13045,13 +13152,24 @@ Syntax
CodePoint::HexDigitsbut only if MV of |HexDigits| ≤ 0x10FFFF
- A conforming implementation must not use the extended definition of EscapeSequence described in B.1.2 when parsing a TemplateCharacter.
Note
+
+ 11.8.6.1Early Errors
+
+ TemplateCharacter::\EscapeSequence
+
+
+
+
- 11.8.6.1Static Semantics: TV and TRV
+ 11.8.6.2Static Semantics: TV and TRV
A template literal component is interpreted as a sequence of Unicode code points. The Template Value (TV) of a literal component is described in terms of code unit values (SV, 11.8.4) contributed by the various parts of the template literal component. As part of this process, some Unicode code points within the template component are interpreted as having a mathematical value (MV, 11.8.3). In determining a TV, escape sequences are replaced by the UTF-16 code unit(s) of the Unicode code point represented by the escape sequence. The Template Raw Value (TRV) is similar to a Template Value with the difference that in TRVs escape sequences are interpreted literally.
@@ -29206,10 +29324,6 @@ 16.2Forbidden Extensions
The Syntactic Grammar must not be extended in any manner that allows the token :
to immediately follow source text that matches the BindingIdentifier nonterminal symbol.
-
-
- TemplateCharacter must not be extended to include LegacyOctalEscapeSequence as defined in B.1.2.
-
When processing strict mode code, the extensions defined in B.3.2, B.3.3, B.3.4, and B.3.6 must not be supported.
@@ -48358,7 +48472,7 @@ A.1Lexical Grammar
EscapeSequence::CharacterEscapeSequence
- 0[lookahead ∉ DecimalDigit]
+ LegacyOctalEscapeSequence
HexEscapeSequence
UnicodeEscapeSequence
@@ -48377,6 +48491,18 @@ A.1Lexical Grammar
DecimalDigit
x
u
+
+
+ LegacyOctalEscapeSequence::OctalDigit[lookahead ∉ OctalDigit]
+ ZeroToThreeOctalDigit[lookahead ∉ OctalDigit]
+ FourToSevenOctalDigit
+ ZeroToThreeOctalDigitOctalDigit
+
+
+ ZeroToThree::one of0123
+
+
+ FourToSeven::one of4567
HexEscapeSequence::xHexDigitHexDigit
@@ -48384,6 +48510,9 @@ A.1Lexical Grammar
UnicodeEscapeSequence::uHex4Digits
u{CodePoint}
+
+
+ StrictZeroEscapeSequence::0[lookahead ∉ DecimalDigit]
Hex4Digits::HexDigitHexDigitHexDigitHexDigit
@@ -49585,111 +49714,11 @@ B.1.1Numeric Literals
B.1.2String Literals
- The syntax and semantics of 11.8.4 is extended as follows except that this extension is not allowed for strict mode code:
- Syntax
-
- EscapeSequence::CharacterEscapeSequence
- LegacyOctalEscapeSequence
- HexEscapeSequence
- UnicodeEscapeSequence
-
-
- LegacyOctalEscapeSequence::OctalDigit[lookahead ∉ OctalDigit]
- ZeroToThreeOctalDigit[lookahead ∉ OctalDigit]
- FourToSevenOctalDigit
- ZeroToThreeOctalDigitOctalDigit
-
-
- ZeroToThree::one of0123
-
-
- FourToSeven::one of4567
+ The following syntax from 11.8.4, and its associated semantics, used to be normative optional:
+
+ EscapeSequence::LegacyOctalEscapeSequence
- This definition of EscapeSequence is not used in strict mode or when parsing TemplateCharacter.
-
-
- B.1.2.1Static Semantics
-
-
+ and the productions for LegacyOctalEscapeSequence, ZeroToThree, and FourToSeven.
@@ -49900,11 +49929,11 @@ B.1.4.3Static Semantics: CharacterValue
Return the remainder of dividing i by 32.
- CharacterEscape::LegacyOctalEscapeSequence
+ CharacterEscape::LegacyOctalEscapeSequence
-- Evaluate the SV of LegacyOctalEscapeSequence (see B.1.2) to obtain a code unit cu.
+- Evaluate the SV of LegacyOctalEscapeSequence (see B.1.2) to obtain a code unit cu.
- Return the numeric value of cu.
@@ -49976,7 +50005,7 @@ B.1.4.4Pattern Semantics
CharacterEscape (21.2.2.10) includes the following additional evaluation rule:
The production
- CharacterEscape::LegacyOctalEscapeSequence
+ CharacterEscape::LegacyOctalEscapeSequence
evaluates as follows:
@@ -51161,7 +51190,9 @@ CThe Strict Mode of ECMAScript
- A conforming implementation, when processing strict mode code, may not extend the syntax of EscapeSequence to include LegacyOctalEscapeSequence as described in B.1.2.
+ A conforming implementation, when processing strict mode code, must disallow instances of the production
+ EscapeSequence::LegacyOctalEscapeSequence
+ that do not cover a StrictZeroEscapeSequence.
diff --git a/spec.html b/spec.html
index 00de982ec17..e47582e665e 100644
--- a/spec.html
+++ b/spec.html
@@ -10402,12 +10402,10 @@ Syntax
EscapeSequence ::
CharacterEscapeSequence
- `0` [lookahead <! DecimalDigit]
+ LegacyOctalEscapeSequence
HexEscapeSequence
UnicodeEscapeSequence
-
- A conforming implementation, when processing strict mode code, must not extend the syntax of |EscapeSequence| to include as described in .
-
+
CharacterEscapeSequence ::
SingleEscapeCharacter
NonEscapeCharacter
@@ -10424,6 +10422,18 @@ Syntax
`x`
`u`
+ LegacyOctalEscapeSequence ::
+ OctalDigit [lookahead <! OctalDigit]
+ ZeroToThree OctalDigit [lookahead <! OctalDigit]
+ FourToSeven OctalDigit
+ ZeroToThree OctalDigit OctalDigit
+
+ ZeroToThree :: one of
+ `0` `1` `2` `3`
+
+ FourToSeven :: one of
+ `4` `5` `6` `7`
+
HexEscapeSequence ::
`x` HexDigit HexDigit
@@ -10439,6 +10449,22 @@ Syntax
<LF> and <CR> cannot appear in a string literal, except as part of a |LineContinuation| to produce the empty code points sequence. The proper way to include either in the String value of a string literal is to use an escape sequence such as `\\n` or `\\u000A`.
+ Supplemental Syntax
+ When processing an instance of the production LegacyOctalEscapeSequence :: OctalDigit the following production is used to refine the interpretation of |LegacyOctalEscapeSequence|.
+
+ StrictZeroEscapeSequence :: `0` [lookahead <! DecimalDigit]
+
+
+
+ Static Semantics: Early Errors
+
+ EscapeSequence :: LegacyOctalEscapeSequence
+
+
+ - It is a Syntax Error if the source code matching this production is strict mode code and |EscapeSequence| is not covering a |StrictZeroEscapeSequence|.
+
+
+
Static Semantics: StringValue
@@ -10452,7 +10478,7 @@ Static Semantics: StringValue
-
+
Static Semantics: SV
A string literal stands for a value of the String type. The String value (SV) of the literal is described in terms of code unit values contributed by the various parts of the string literal. As part of this process, some Unicode code points within the string literal are interpreted as having a mathematical value (MV), as described below or in .
@@ -10514,7 +10540,7 @@ Static Semantics: SV
The SV of EscapeSequence :: CharacterEscapeSequence is the SV of |CharacterEscapeSequence|.
- The SV of EscapeSequence :: `0` is the code unit 0x0000 (NULL).
+ The SV of EscapeSequence :: LegacyOctalEscapeSequence is the SV of |LegacyOctalEscapeSequence|.
The SV of EscapeSequence :: HexEscapeSequence is the SV of |HexEscapeSequence|.
@@ -10679,6 +10705,18 @@ Static Semantics: SV
The SV of NonEscapeCharacter :: SourceCharacter but not one of EscapeCharacter or LineTerminator is the UTF16Encoding of the code point value of |SourceCharacter|.
+
+ The SV of LegacyOctalEscapeSequence :: OctalDigit is the code unit whose value is the MV of |OctalDigit|.
+
+
+ The SV of LegacyOctalEscapeSequence :: ZeroToThree OctalDigit is the code unit whose value is (8ℝ times the MV of |ZeroToThree|) plus the MV of |OctalDigit|.
+
+
+ The SV of LegacyOctalEscapeSequence :: FourToSeven OctalDigit is the code unit whose value is (8ℝ times the MV of |FourToSeven|) plus the MV of |OctalDigit|.
+
+
+ The SV of LegacyOctalEscapeSequence :: ZeroToThree OctalDigit OctalDigit is the code unit whose value is (64ℝ (that is, 82) times the MV of |ZeroToThree|) plus (8ℝ times the MV of the first |OctalDigit|) plus the MV of the second |OctalDigit|.
+
The SV of HexEscapeSequence :: `x` HexDigit HexDigit is the code unit whose value is (16ℝ times the MV of the first |HexDigit|) plus the MV of the second |HexDigit|.
@@ -10693,6 +10731,36 @@ Static Semantics: SV
+
+
+ Static Semantics: MV
+
+ -
+ The MV of ZeroToThree :: `0` is 0ℝ.
+
+ -
+ The MV of ZeroToThree :: `1` is 1ℝ.
+
+ -
+ The MV of ZeroToThree :: `2` is 2ℝ.
+
+ -
+ The MV of ZeroToThree :: `3` is 3ℝ.
+
+ -
+ The MV of FourToSeven :: `4` is 4ℝ.
+
+ -
+ The MV of FourToSeven :: `5` is 5ℝ.
+
+ -
+ The MV of FourToSeven :: `6` is 6ℝ.
+
+ -
+ The MV of FourToSeven :: `7` is 7ℝ.
+
+
+
@@ -10830,11 +10898,20 @@ Syntax
CodePoint ::
HexDigits [> but only if MV of |HexDigits| ≤ 0x10FFFF ]
- A conforming implementation must not use the extended definition of |EscapeSequence| described in when parsing a |TemplateCharacter|.
|TemplateSubstitutionTail| is used by the |InputElementTemplateTail| alternative lexical goal.
+
+ Early Errors
+
+ TemplateCharacter :: `\` EscapeSequence
+
+
+ - It is a Syntax Error if |EscapeSequence| is an instance of EscapeSequence :: LegacyOctalEscapeSequence and |EscapeSequence| is not covering a |StrictZeroEscapeSequence|.
+
+
+
Static Semantics: TV and TRV
A template literal component is interpreted as a sequence of Unicode code points. The Template Value (TV) of a literal component is described in terms of code unit values (SV, ) contributed by the various parts of the template literal component. As part of this process, some Unicode code points within the template component are interpreted as having a mathematical value (MV, ). In determining a TV, escape sequences are replaced by the UTF-16 code unit(s) of the Unicode code point represented by the escape sequence. The Template Raw Value (TRV) is similar to a Template Value with the difference that in TRVs escape sequences are interpreted literally.
@@ -10930,7 +11007,7 @@ Static Semantics: TV and TRV
The TRV of EscapeSequence :: CharacterEscapeSequence is the TRV of |CharacterEscapeSequence|.
- The TRV of EscapeSequence :: `0` is the code unit 0x0030 (DIGIT ZERO).
+ The TRV of EscapeSequence :: LegacyOctalEscapeSequence is the code unit 0x0030 (DIGIT ZERO).
The TRV of EscapeSequence :: HexEscapeSequence is the TRV of |HexEscapeSequence|.
@@ -23488,9 +23565,6 @@ Forbidden Extensions
The Syntactic Grammar must not be extended in any manner that allows the token `:` to immediately follow source text that matches the |BindingIdentifier| nonterminal symbol.
-
- |TemplateCharacter| must not be extended to include as defined in .
-
When processing strict mode code, the extensions defined in , , , and must not be supported.
@@ -39856,8 +39930,12 @@ Lexical Grammar
+
+
+
+
@@ -40187,73 +40265,11 @@ Numeric Literals
String Literals
- The syntax and semantics of is extended as follows except that this extension is not allowed for strict mode code:
- Syntax
-
- EscapeSequence ::
- CharacterEscapeSequence
- LegacyOctalEscapeSequence
- HexEscapeSequence
- UnicodeEscapeSequence
-
- LegacyOctalEscapeSequence ::
- OctalDigit [lookahead <! OctalDigit]
- ZeroToThree OctalDigit [lookahead <! OctalDigit]
- FourToSeven OctalDigit
- ZeroToThree OctalDigit OctalDigit
-
- ZeroToThree :: one of
- `0` `1` `2` `3`
-
- FourToSeven :: one of
- `4` `5` `6` `7`
+ The following syntax from , and its associated semantics, used to be normative optional:
+
+ EscapeSequence :: LegacyOctalEscapeSequence
- This definition of |EscapeSequence| is not used in strict mode or when parsing |TemplateCharacter|.
-
-
- Static Semantics
-
- -
- The SV of EscapeSequence :: LegacyOctalEscapeSequence is the SV of |LegacyOctalEscapeSequence|.
-
- -
- The SV of LegacyOctalEscapeSequence :: OctalDigit is the code unit whose value is the MV of |OctalDigit|.
-
- -
- The SV of LegacyOctalEscapeSequence :: ZeroToThree OctalDigit is the code unit whose value is (8 times the MV of |ZeroToThree|) plus the MV of |OctalDigit|.
-
- -
- The SV of LegacyOctalEscapeSequence :: FourToSeven OctalDigit is the code unit whose value is (8 times the MV of |FourToSeven|) plus the MV of |OctalDigit|.
-
- -
- The SV of LegacyOctalEscapeSequence :: ZeroToThree OctalDigit OctalDigit is the code unit whose value is (64 (that is, 82) times the MV of |ZeroToThree|) plus (8 times the MV of the first |OctalDigit|) plus the MV of the second |OctalDigit|.
-
- -
- The MV of ZeroToThree :: `0` is 0.
-
- -
- The MV of ZeroToThree :: `1` is 1.
-
- -
- The MV of ZeroToThree :: `2` is 2.
-
- -
- The MV of ZeroToThree :: `3` is 3.
-
- -
- The MV of FourToSeven :: `4` is 4.
-
- -
- The MV of FourToSeven :: `5` is 5.
-
- -
- The MV of FourToSeven :: `6` is 6.
-
- -
- The MV of FourToSeven :: `7` is 7.
-
-
-
+ and the productions for |LegacyOctalEscapeSequence|, |ZeroToThree|, and |FourToSeven|.