diff --git a/spec.html b/spec.html
index 4c869347727..e3289e17d95 100644
--- a/spec.html
+++ b/spec.html
@@ -14320,12 +14320,11 @@
Syntax
EscapeSequence ::
CharacterEscapeSequence
- `0` [lookahead <! DecimalDigit]
+ LegacyOctalEscapeSequence
+ NonOctalDecimalEscapeSequence
HexEscapeSequence
UnicodeEscapeSequence
-
- A conforming implementation, when processing strict mode code, must not extend the syntax of |EscapeSequence| to include or as described in .
-
+
CharacterEscapeSequence ::
SingleEscapeCharacter
NonEscapeCharacter
@@ -14342,6 +14341,21 @@ 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`
+
+ NonOctalDecimalEscapeSequence :: one of
+ `8` `9`
+
HexEscapeSequence ::
`x` HexDigit HexDigit
@@ -14357,7 +14371,37 @@ 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|.
+
+
+ EscapeSequence :: NonOctalDecimalEscapeSequence
+
+
+ - It is a Syntax Error if the source code matching this production is strict mode code.
+
+ In non-strict code, this syntax is allowed, but deprecated.
+
+ It is possible for string literals to precede a Use Strict Directive that places the enclosing code in strict mode, and implementations must take care to enforce the above rules for such literals. For example, the following source text contains a Syntax Error:
+
+ function invalid() { "\7"; "use strict"; }
+
+
+
+
+
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 String 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 .
@@ -14397,9 +14441,6 @@ Static Semantics: SV
-
The SV of SingleStringCharacter :: LineContinuation is the empty String.
- -
- The SV of EscapeSequence :: `0` is the String value consisting of the code unit 0x0000 (NULL).
-
-
The SV of CharacterEscapeSequence :: SingleEscapeCharacter is the String value consisting of the code unit whose value is determined by the |SingleEscapeCharacter| according to .
@@ -14554,6 +14595,15 @@ Static Semantics: SV
-
The SV of NonEscapeCharacter :: SourceCharacter but not one of EscapeCharacter or LineTerminator is the result of performing UTF16EncodeCodePoint on the code point value of |SourceCharacter|.
+ -
+ The SV of EscapeSequence :: LegacyOctalEscapeSequence is the String value consisting of the code unit whose value is the MV of |LegacyOctalEscapeSequence|.
+
+ -
+ The SV of NonOctalDecimalEscapeSequence :: `8` is the String value consisting of the code unit 0x0038 (DIGIT EIGHT).
+
+ -
+ The SV of NonOctalDecimalEscapeSequence :: `9` is the String value consisting of the code unit 0x0039 (DIGIT NINE).
+
-
The SV of HexEscapeSequence :: `x` HexDigit HexDigit is the String value consisting of the code unit whose value is the MV of |HexEscapeSequence|.
@@ -14572,6 +14622,39 @@ Static Semantics: SV
Static Semantics: MV