Ecmascript language grammar as of 1/4/2018

Lexical grammar
Expressions
Statements
Functions and Classes
Scripts and Modules
Number conversions
Universal resource identifier character classes
Regular expressions
SourceCharacter
SourceCharacter ::
 > any Unicode code point
InputElementDiv
InputElementDiv ::
 WhiteSpace
 LineTerminator
 Comment
 CommonToken
 DivPunctuator
 RightBracePunctuator
InputElementRegExp
InputElementRegExp ::
 WhiteSpace
 LineTerminator
 Comment
 CommonToken
 RightBracePunctuator
 RegularExpressionLiteral
InputElementRegExpOrTemplateTail
InputElementRegExpOrTemplateTail ::
 WhiteSpace
 LineTerminator
 Comment
 CommonToken
 RegularExpressionLiteral
 TemplateSubstitutionTail
InputElementTemplateTail
InputElementTemplateTail ::
 WhiteSpace
 LineTerminator
 Comment
 CommonToken
 DivPunctuator
 TemplateSubstitutionTail
WhiteSpace
WhiteSpace :: one of
 <TAB> <VT> <FF> <SP> <NBSP> <ZWNBSP> <USP>
LineTerminator
LineTerminator :: one of
 <LF> <CR> <LS> <PS>
LineTerminatorSequence
LineTerminatorSequence ::
 <LF>
 <CR> [lookahead != <LF> ]
 <LS>
 <PS>
 <CR> <LF>
Comment
Comment ::
 MultiLineComment
 SingleLineComment
Comment ::
 MultiLineComment
 SingleLineComment
 SingleLineHTMLOpenComment
 SingleLineHTMLCloseComment
 SingleLineDelimitedComment
MultiLineComment
MultiLineComment ::
 `/*` MultiLineCommentChars? `*/`
MultiLineComment ::
 `/*` FirstCommentLine? LineTerminator MultiLineCommentChars? `*/` HTMLCloseComment?
MultiLineCommentChars
MultiLineCommentChars ::
 MultiLineNotAsteriskChar MultiLineCommentChars?
 `*` PostAsteriskCommentChars?
PostAsteriskCommentChars
PostAsteriskCommentChars ::
 MultiLineNotForwardSlashOrAsteriskChar MultiLineCommentChars?
 `*` PostAsteriskCommentChars?
MultiLineNotAsteriskChar
MultiLineNotAsteriskChar ::
 SourceCharacter but not `*`
MultiLineNotForwardSlashOrAsteriskChar
MultiLineNotForwardSlashOrAsteriskChar ::
 SourceCharacter but not one of `/` or `*`
SingleLineComment
SingleLineComment ::
 `//` SingleLineCommentChars?
SingleLineCommentChars
SingleLineCommentChars ::
 SingleLineCommentChar SingleLineCommentChars?
SingleLineCommentChar
SingleLineCommentChar ::
 SourceCharacter but not LineTerminator
CommonToken
CommonToken ::
 IdentifierName
 Punctuator
 NumericLiteral
 StringLiteral
 Template
IdentifierName
IdentifierName ::
 IdentifierStart
 IdentifierName IdentifierPart
IdentifierStart
IdentifierStart ::
 UnicodeIDStart
 `$`
 `_`
 `\` UnicodeEscapeSequence
IdentifierPart
IdentifierPart ::
 UnicodeIDContinue
 `$`
 `\` UnicodeEscapeSequence
 <ZWNJ>
 <ZWJ>
UnicodeIDStart
UnicodeIDStart ::
 > any Unicode code point with the Unicode property “ID_Start”
UnicodeIDContinue
UnicodeIDContinue ::
 > any Unicode code point with the Unicode property “ID_Continue”
ReservedWord
ReservedWord ::
 Keyword
 FutureReservedWord
 NullLiteral
 BooleanLiteral
Keyword
Keyword :: one of
 `await`
 `break`
 `case` `catch` `class` `const` `continue`
 `debugger` `default` `delete` `do`
 `else` `export` `extends`
 `finally` `for` `function`
 `if` `import` `in` `instanceof`
 `new`
 `return`
 `super` `switch`
 `this` `throw` `try` `typeof`
 `var` `void`
 `while` `with`
 `yield`
FutureReservedWord
FutureReservedWord ::
 `enum`

The following tokens are also considered to be |FutureReservedWord|s when parsing strict mode code:

implements  package  protected
interface  private  public

Punctuator
Punctuator :: one of
 `{` `(` `)` `[` `]`
 `.` `...` `;` `,`
 `<` `>` `<=` `>=`
 `==` `!=` `===` `!==`
 `+` `-` `*` `%` `**`
 `++` `--`
 `<<` `>>` `>>>`
 `&` `|` `^`
 `!` `~`
 `&&` `||`
 `?` `:`
 `=` `+=` `-=` `*=` `%=` `**=` `<<=` `>>=` `>>>=` `&=` `|=` `^=`
 `=>`
DivPunctuator
DivPunctuator :: one of
 `/` `/=`
RightBracePunctuator
RightBracePunctuator ::
 `}`
NullLiteral
NullLiteral ::
 `null`
BooleanLiteral
BooleanLiteral :: one of
 `true` `false`
NumericLiteral
NumericLiteral ::
 DecimalLiteral
 BinaryIntegerLiteral
 OctalIntegerLiteral
 HexIntegerLiteral
NumericLiteral ::
 DecimalLiteral
 BinaryIntegerLiteral
 OctalIntegerLiteral
 HexIntegerLiteral
 LegacyOctalIntegerLiteral
DecimalLiteral
DecimalLiteral ::
 DecimalIntegerLiteral `.` DecimalDigits? ExponentPart?
 `.` DecimalDigits ExponentPart?
 DecimalIntegerLiteral ExponentPart?
DecimalIntegerLiteral
DecimalIntegerLiteral ::
 `0`
 NonZeroDigit DecimalDigits?
DecimalIntegerLiteral ::
 `0`
 NonZeroDigit DecimalDigits?
 NonOctalDecimalIntegerLiteral
DecimalDigits
DecimalDigits ::
 DecimalDigit
 DecimalDigits DecimalDigit
DecimalDigit
DecimalDigit :: one of
 `0` `1` `2` `3` `4` `5` `6` `7` `8` `9`
NonZeroDigit
NonZeroDigit :: one of
 `1` `2` `3` `4` `5` `6` `7` `8` `9`
ExponentPart
ExponentPart ::
 ExponentIndicator SignedInteger
ExponentIndicator
ExponentIndicator :: one of
 `e` `E`
SignedInteger
SignedInteger ::
 DecimalDigits
 `+` DecimalDigits
 `-` DecimalDigits
BinaryIntegerLiteral
BinaryIntegerLiteral ::
 `0b` BinaryDigits
 `0B` BinaryDigits
BinaryDigits
BinaryDigits ::
 BinaryDigit
 BinaryDigits BinaryDigit
BinaryDigit
BinaryDigit :: one of
 `0` `1`
OctalIntegerLiteral
OctalIntegerLiteral ::
 `0o` OctalDigits
 `0O` OctalDigits
OctalDigits
OctalDigits ::
 OctalDigit
 OctalDigits OctalDigit
OctalDigit
OctalDigit :: one of
 `0` `1` `2` `3` `4` `5` `6` `7`
HexIntegerLiteral
HexIntegerLiteral ::
 `0x` HexDigits
 `0X` HexDigits
HexDigits
HexDigits ::
 HexDigit
 HexDigits HexDigit
HexDigit
HexDigit :: one of
 `0` `1` `2` `3` `4` `5` `6` `7` `8` `9` `a` `b` `c` `d` `e` `f` `A` `B` `C` `D` `E` `F`
StringLiteral
StringLiteral ::
 `"` DoubleStringCharacters? `"`
 `'` SingleStringCharacters? `'`
DoubleStringCharacters
DoubleStringCharacters ::
 DoubleStringCharacter DoubleStringCharacters?
SingleStringCharacters
SingleStringCharacters ::
 SingleStringCharacter SingleStringCharacters?
DoubleStringCharacter
DoubleStringCharacter ::
 SourceCharacter but not one of `"` or `\` or LineTerminator
 `\` EscapeSequence
 LineContinuation
DoubleStringCharacter ::
 SourceCharacter but not one of `"` or `\` or U+0000 through U+001F
 `\` EscapeSequence
SingleStringCharacter
SingleStringCharacter ::
 SourceCharacter but not one of `'` or `\` or LineTerminator
 `\` EscapeSequence
 LineContinuation
LineContinuation
LineContinuation ::
 `\` LineTerminatorSequence
EscapeSequence
EscapeSequence ::
 CharacterEscapeSequence
 `0` [lookahead <! DecimalDigit]
 HexEscapeSequence
 UnicodeEscapeSequence
EscapeSequence ::
 CharacterEscapeSequence
 LegacyOctalEscapeSequence
 HexEscapeSequence
 UnicodeEscapeSequence
CharacterEscapeSequence
CharacterEscapeSequence ::
 SingleEscapeCharacter
 NonEscapeCharacter
SingleEscapeCharacter
SingleEscapeCharacter :: one of
 `'` `"` `\` `b` `f` `n` `r` `t` `v`
NonEscapeCharacter
NonEscapeCharacter ::
 SourceCharacter but not one of EscapeCharacter or LineTerminator
EscapeCharacter
EscapeCharacter :: one of
 `'` `"` `\` `b` `f` `n` `r` `t` `v`
HexEscapeSequence
HexEscapeSequence ::
 `x` HexDigit HexDigit
UnicodeEscapeSequence
UnicodeEscapeSequence ::
 `u` Hex4Digits
 `u{` CodePoint `}`
Hex4Digits
Hex4Digits ::
 HexDigit HexDigit HexDigit HexDigit
RegularExpressionLiteral
RegularExpressionLiteral ::
 `/` RegularExpressionBody `/` RegularExpressionFlags
RegularExpressionBody
RegularExpressionBody ::
 RegularExpressionFirstChar RegularExpressionChars
RegularExpressionChars
RegularExpressionChars ::
 [empty]
 RegularExpressionChars RegularExpressionChar
RegularExpressionFirstChar
RegularExpressionFirstChar ::
 RegularExpressionNonTerminator but not one of `*` or `\` or `/` or `[`
 RegularExpressionBackslashSequence
 RegularExpressionClass
RegularExpressionChar
RegularExpressionChar ::
 RegularExpressionNonTerminator but not one of `\` or `/` or `[`
 RegularExpressionBackslashSequence
 RegularExpressionClass
RegularExpressionBackslashSequence
RegularExpressionBackslashSequence ::
 `\` RegularExpressionNonTerminator
RegularExpressionNonTerminator
RegularExpressionNonTerminator ::
 SourceCharacter but not LineTerminator
RegularExpressionClass
RegularExpressionClass ::
 `[` RegularExpressionClassChars `]`
RegularExpressionClassChars
RegularExpressionClassChars ::
 [empty]
 RegularExpressionClassChars RegularExpressionClassChar
RegularExpressionClassChar
RegularExpressionClassChar ::
 RegularExpressionNonTerminator but not one of `]` or `\`
 RegularExpressionBackslashSequence
RegularExpressionFlags
RegularExpressionFlags ::
 [empty]
 RegularExpressionFlags IdentifierPart
Template
Template ::
 NoSubstitutionTemplate
 TemplateHead
NoSubstitutionTemplate
NoSubstitutionTemplate ::
 ` `` TemplateCharacters? ` ``
TemplateHead
TemplateHead ::
 ` `` TemplateCharacters? `${`
TemplateSubstitutionTail
TemplateSubstitutionTail ::
 TemplateMiddle
 TemplateTail
TemplateMiddle
TemplateMiddle ::
 `}` TemplateCharacters? `${`
TemplateTail
TemplateTail ::
 `}` TemplateCharacters? ` ``
TemplateCharacters
TemplateCharacters ::
 TemplateCharacter TemplateCharacters?
TemplateCharacter
TemplateCharacter ::
 `$` [lookahead != `{` ]
 `\` EscapeSequence
 `\` NotEscapeSequence
 LineContinuation
 LineTerminatorSequence
 SourceCharacter but not one of ` `` or `\` or `$` or LineTerminator
IdentifierReference
IdentifierReference[Yield, Await] :
 Identifier
 [~Yield] `yield`
 [~Await] `await`
IdentifierReference : `yield`
IdentifierReference : `await`
IdentifierReference[Yield, Await] : Identifier
BindingIdentifier
BindingIdentifier[Yield, Await] :
 Identifier
 `yield`
 `await`
BindingIdentifier : `yield`
BindingIdentifier : `await`
BindingIdentifier[Yield, Await] : Identifier
BindingIdentifier :
 Identifier
 `yield`
 `await`
Identifier
Identifier ::
 IdentifierName but not ReservedWord
Identifier[Yield, Await] :
 Identifier
 `yield`
 `await`
AsyncArrowBindingIdentifier
AsyncArrowBindingIdentifier[Yield] :
 BindingIdentifier[?Yield, +Await]
AsyncArrowBindingIdentifier : BindingIdentifier
AsyncArrowBindingIdentifier[Yield] : BindingIdentifier[?Yield, +Await]
LabelIdentifier
LabelIdentifier[Yield, Await] :
 Identifier
 [~Yield] `yield`
 [~Await] `await`
LabelIdentifier : `yield`
LabelIdentifier : `await`
LabelIdentifier[Yield, Await] : Identifier
PrimaryExpression
PrimaryExpression[Yield, Await] :
 `this`
 IdentifierReference[?Yield, ?Await]
 Literal
 ArrayLiteral[?Yield, ?Await]
 ObjectLiteral[?Yield, ?Await]
 FunctionExpression
 ClassExpression[?Yield, ?Await]
 GeneratorExpression
 AsyncFunctionExpression
 AsyncGeneratorExpression
 RegularExpressionLiteral
 TemplateLiteral[?Yield, ?Await, ~Tagged]
 CoverParenthesizedExpressionAndArrowParameterList[?Yield, ?Await] #parencover
PrimaryExpression :
 `this`
 IdentifierReference
 Literal
 ArrayLiteral
 ObjectLiteral
 RegularExpressionLiteral
 TemplateLiteral
PrimaryExpression :
 `this`
 Literal
 ArrayLiteral
 ObjectLiteral
 FunctionExpression
 ClassExpression
 GeneratorExpression
 AsyncFunctionExpression
 AsyncGeneratorExpression
 RegularExpressionLiteral
 TemplateLiteral
 CoverParenthesizedExpressionAndArrowParameterList
PrimaryExpression :
 `this`
 Literal
 ArrayLiteral
 ObjectLiteral
 FunctionExpression
 ClassExpression
 GeneratorExpression
 AsyncFunctionExpression
 AsyncGeneratorExpression
 RegularExpressionLiteral
 TemplateLiteral
PrimaryExpression :
 `this`
 IdentifierReference
 Literal
 ArrayLiteral
 ObjectLiteral
 FunctionExpression
 ClassExpression
 GeneratorExpression
 AsyncFunctionExpression
 AsyncGeneratorExpression
 RegularExpressionLiteral
 TemplateLiteral
CoverParenthesizedExpressionAndArrowParameterList
CoverParenthesizedExpressionAndArrowParameterList[Yield, Await] :
 `(` Expression[+In, ?Yield, ?Await] `)`
 `(` Expression[+In, ?Yield, ?Await] `,` `)`
 `(` `)`
 `(` `...` BindingIdentifier[?Yield, ?Await] `)`
 `(` `...` BindingPattern[?Yield, ?Await] `)`
 `(` Expression[+In, ?Yield, ?Await] `,` `...` BindingIdentifier[?Yield, ?Await] `)`
 `(` Expression[+In, ?Yield, ?Await] `,` `...` BindingPattern[?Yield, ?Await] `)`
CoverParenthesizedExpressionAndArrowParameterList :
 `(` Expression `)`
 `(` `)`
 `(` `...` BindingIdentifier `)`
 `(` `...` BindingPattern `)`
 `(` Expression `,` `...` BindingIdentifier `)`
 `(` Expression `,` `...` BindingPattern `)`

When processing an instance of the production |PrimaryExpression| the interpretation of |CoverParenthesizedExpressionAndArrowParameterList| is refined using the following grammar:

ParenthesizedExpression
ParenthesizedExpression[Yield, Await] :
 `(` Expression[+In, ?Yield, ?Await] `)`
ParenthesizedExpression :
 `(` Expression `)`
Literal
Literal :
 NullLiteral
 BooleanLiteral
 NumericLiteral
 StringLiteral
ArrayLiteral
ArrayLiteral[Yield, Await] :
 `[` Elision? `]`
 `[` ElementList[?Yield, ?Await] `]`
 `[` ElementList[?Yield, ?Await] `,` Elision? `]`
ElementList
ElementList[Yield, Await] :
Elision? AssignmentExpression[+In, ?Yield, ?Await]
Elision? SpreadElement[?Yield, ?Await]
 ElementList[?Yield, ?Await] `,` Elision? AssignmentExpression[+In, ?Yield, ?Await]
 ElementList[?Yield, ?Await] `,` Elision? SpreadElement[?Yield, ?Await]
Elision
Elision :
 `,`
 Elision `,`
SpreadElement
SpreadElement[Yield, Await] :
 `...` AssignmentExpression[+In, ?Yield, ?Await]
ObjectLiteral
ObjectLiteral[Yield, Await] :
 `{` `}`
 `{` PropertyDefinitionList[?Yield, ?Await] `}`
 `{` PropertyDefinitionList[?Yield, ?Await] `,` `}`
ObjectLiteral :
 `{` PropertyDefinitionList `}`
 `{` PropertyDefinitionList `,` `}`
ObjectLiteral : `{` PropertyDefinitionList `}`
PropertyDefinitionList
PropertyDefinitionList[Yield, Await] :
 PropertyDefinition[?Yield, ?Await]
 PropertyDefinitionList[?Yield, ?Await] `,` PropertyDefinition[?Yield, ?Await]
PropertyDefinition
PropertyDefinition[Yield, Await] :
 IdentifierReference[?Yield, ?Await]
 CoverInitializedName[?Yield, ?Await]
 PropertyName[?Yield, ?Await] `:` AssignmentExpression[+In, ?Yield, ?Await]
 MethodDefinition[?Yield, ?Await]
 `...` AssignmentExpression[+In, ?Yield, ?Await]
PropertyName
PropertyName[Yield, Await] :
 LiteralPropertyName
 ComputedPropertyName[?Yield, ?Await]
LiteralPropertyName
LiteralPropertyName :
 IdentifierName
 StringLiteral
 NumericLiteral
ComputedPropertyName
ComputedPropertyName[Yield, Await] :
 `[` AssignmentExpression[+In, ?Yield, ?Await] `]`
CoverInitializedName
CoverInitializedName[Yield, Await] :
 IdentifierReference[?Yield, ?Await] Initializer[+In, ?Yield, ?Await]
Initializer
Initializer[In, Yield, Await] :
 `=` AssignmentExpression[?In, ?Yield, ?Await]
TemplateLiteral
TemplateLiteral[Yield, Await, Tagged] :
 NoSubstitutionTemplate
 SubstitutionTemplate[?Yield, ?Await, ?Tagged]
TemplateLiteral[Yield, Await, Tagged] : NoSubstitutionTemplate
TemplateSpans
TemplateSpans[Yield, Await, Tagged] :
 TemplateTail
 TemplateMiddleList[?Yield, ?Await, ?Tagged] TemplateTail
TemplateSpans[Yield, Await, Tagged] : TemplateTail
TemplateMiddleList
TemplateMiddleList[Yield, Await, Tagged] :
 TemplateMiddle Expression[+In, ?Yield, ?Await]
 TemplateMiddleList[?Yield, ?Await, ?Tagged] TemplateMiddle Expression[+In, ?Yield, ?Await]
MemberExpression
MemberExpression[Yield, Await] :
 PrimaryExpression[?Yield, ?Await]
 MemberExpression[?Yield, ?Await] `[` Expression[+In, ?Yield, ?Await] `]`
 MemberExpression[?Yield, ?Await] `.` IdentifierName
 MemberExpression[?Yield, ?Await] TemplateLiteral[?Yield, ?Await, +Tagged]
 SuperProperty[?Yield, ?Await]
 MetaProperty
 `new` MemberExpression[?Yield, ?Await] Arguments[?Yield, ?Await]
MemberExpression :
 MemberExpression `[` Expression `]`
 MemberExpression `.` IdentifierName
 MemberExpression TemplateLiteral
 SuperProperty
 MetaProperty
 `new` MemberExpression Arguments
MemberExpression :
 MemberExpression `[` Expression `]`
 MemberExpression `.` IdentifierName
 SuperProperty
MemberExpression :
 MemberExpression TemplateLiteral
 `new` MemberExpression Arguments
MemberExpression :
 MemberExpression `[` Expression `]`
 MemberExpression `.` IdentifierName
 SuperProperty
 MetaProperty
 `new` MemberExpression Arguments
MemberExpression :
 MemberExpression TemplateLiteral
SuperProperty
SuperProperty[Yield, Await] :
 `super` `[` Expression[+In, ?Yield, ?Await] `]`
 `super` `.` IdentifierName
MetaProperty
MetaProperty :
 NewTarget
NewTarget
NewTarget :
 `new` `.` `target`
NewExpression
NewExpression[Yield, Await] :
 MemberExpression[?Yield, ?Await]
 `new` NewExpression[?Yield, ?Await]
NewExpression :
 `new` NewExpression
NewExpression : `new` NewExpression
CallExpression
CallExpression[Yield, Await] :
 CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await] #callcover
 SuperCall[?Yield, ?Await]
 CallExpression[?Yield, ?Await] Arguments[?Yield, ?Await]
 CallExpression[?Yield, ?Await] `[` Expression[+In, ?Yield, ?Await] `]`
 CallExpression[?Yield, ?Await] `.` IdentifierName
 CallExpression[?Yield, ?Await] TemplateLiteral[?Yield, ?Await, +Tagged]
CallExpression : CoverCallExpressionAndAsyncArrowHead
CallExpression :
 CallExpression `[` Expression `]`
 CallExpression `.` IdentifierName
CallExpression :
 CoverCallExpressionAndAsyncArrowHead
 SuperCall
 CallExpression Arguments
 CallExpression TemplateLiteral
CallExpression :
 SuperCall
 CallExpression `[` Expression `]`
 CallExpression `.` IdentifierName
CallExpression :
 CoverCallExpressionAndAsyncArrowHead
 CallExpression Arguments
 CallExpression TemplateLiteral
CoverCallExpressionAndAsyncArrowHead
CoverCallExpressionAndAsyncArrowHead[Yield, Await] :
 MemberExpression[?Yield, ?Await] Arguments[?Yield, ?Await]
CoverCallExpressionAndAsyncArrowHead : MemberExpression Arguments

When processing an instance of the production |CallExpression| the interpretation of |CoverCallExpressionAndAsyncArrowHead| is refined using the following grammar:

CallMemberExpression
CallMemberExpression[Yield, Await] :
 MemberExpression[?Yield, ?Await] Arguments[?Yield, ?Await]
SuperCall
SuperCall[Yield, Await] :
 `super` Arguments[?Yield, ?Await]
Arguments
Arguments[Yield, Await] :
 `(` `)`
 `(` ArgumentList[?Yield, ?Await] `)`
 `(` ArgumentList[?Yield, ?Await] `,` `)`
ArgumentList
ArgumentList :
 AssignmentExpression
 ArgumentList `,` AssignmentExpression
ArgumentList[Yield, Await] :
 AssignmentExpression[+In, ?Yield, ?Await]
 `...` AssignmentExpression[+In, ?Yield, ?Await]
 ArgumentList[?Yield, ?Await] `,` AssignmentExpression[+In, ?Yield, ?Await]
 ArgumentList[?Yield, ?Await] `,` `...` AssignmentExpression[+In, ?Yield, ?Await]
LeftHandSideExpression
LeftHandSideExpression[Yield, Await] :
 NewExpression[?Yield, ?Await]
 CallExpression[?Yield, ?Await]
LeftHandSideExpression :
 CallExpression
UpdateExpression
UpdateExpression[Yield, Await] :
 LeftHandSideExpression[?Yield, ?Await] [no LineTerminator here] `++`
 LeftHandSideExpression[?Yield, ?Await] [no LineTerminator here] `--`
UpdateExpression[Yield, Await] :
 LeftHandSideExpression[?Yield, ?Await]
 LeftHandSideExpression[?Yield, ?Await] [no LineTerminator here] `++`
 LeftHandSideExpression[?Yield, ?Await] [no LineTerminator here] `--`
 `++` UnaryExpression[?Yield, ?Await]
 `--` UnaryExpression[?Yield, ?Await]
UpdateExpression :
 LeftHandSideExpression `++`
 LeftHandSideExpression `--`
UpdateExpression :
 `++` UnaryExpression
 `--` UnaryExpression
UpdateExpression :
 LeftHandSideExpression `++`
 LeftHandSideExpression `--`
 `++` UnaryExpression
 `--` UnaryExpression
UnaryExpression
UnaryExpression[Yield, Await] :
 UpdateExpression[?Yield, ?Await]
 `delete` UnaryExpression[?Yield, ?Await]
 `void` UnaryExpression[?Yield, ?Await]
 `typeof` UnaryExpression[?Yield, ?Await]
 `+` UnaryExpression[?Yield, ?Await]
 `-` UnaryExpression[?Yield, ?Await]
 `~` UnaryExpression[?Yield, ?Await]
 `!` UnaryExpression[?Yield, ?Await]
 [+Await] AwaitExpression[?Yield]
UnaryExpression :
 `delete` UnaryExpression
 `void` UnaryExpression
 `typeof` UnaryExpression
 `+` UnaryExpression
 `-` UnaryExpression
 `~` UnaryExpression
 `!` UnaryExpression
 AwaitExpression
ExponentiationExpression
ExponentiationExpression[Yield, Await] :
 UnaryExpression[?Yield, ?Await]
 UpdateExpression[?Yield, ?Await] `**` ExponentiationExpression[?Yield, ?Await]
ExponentiationExpression :
 UpdateExpression `**` ExponentiationExpression
ExponentiationExpression : UpdateExpression `**` ExponentiationExpression
MultiplicativeExpression
MultiplicativeExpression[Yield, Await] :
 ExponentiationExpression[?Yield, ?Await]
 MultiplicativeExpression[?Yield, ?Await] MultiplicativeOperator ExponentiationExpression[?Yield, ?Await]
MultiplicativeExpression :
 MultiplicativeExpression MultiplicativeOperator ExponentiationExpression
MultiplicativeOperator
MultiplicativeOperator : one of
 `*` `/` `%`
AdditiveExpression
AdditiveExpression[Yield, Await] :
 MultiplicativeExpression[?Yield, ?Await]
 AdditiveExpression[?Yield, ?Await] `+` MultiplicativeExpression[?Yield, ?Await]
 AdditiveExpression[?Yield, ?Await] `-` MultiplicativeExpression[?Yield, ?Await]
AdditiveExpression :
 AdditiveExpression `+` MultiplicativeExpression
 AdditiveExpression `-` MultiplicativeExpression
ShiftExpression
ShiftExpression[Yield, Await] :
 AdditiveExpression[?Yield, ?Await]
 ShiftExpression[?Yield, ?Await] `<<` AdditiveExpression[?Yield, ?Await]
 ShiftExpression[?Yield, ?Await] `>>` AdditiveExpression[?Yield, ?Await]
 ShiftExpression[?Yield, ?Await] `>>>` AdditiveExpression[?Yield, ?Await]
ShiftExpression :
 ShiftExpression `<<` AdditiveExpression
 ShiftExpression `>>` AdditiveExpression
 ShiftExpression `>>>` AdditiveExpression
RelationalExpression
RelationalExpression[In, Yield, Await] :
 ShiftExpression[?Yield, ?Await]
 RelationalExpression[?In, ?Yield, ?Await] `<` ShiftExpression[?Yield, ?Await]
 RelationalExpression[?In, ?Yield, ?Await] `>` ShiftExpression[?Yield, ?Await]
 RelationalExpression[?In, ?Yield, ?Await] `<=` ShiftExpression[?Yield, ?Await]
 RelationalExpression[?In, ?Yield, ?Await] `>=` ShiftExpression[?Yield, ?Await]
 RelationalExpression[?In, ?Yield, ?Await] `instanceof` ShiftExpression[?Yield, ?Await]
 [+In] RelationalExpression[+In, ?Yield, ?Await] `in` ShiftExpression[?Yield, ?Await]
RelationalExpression :
 RelationalExpression `<` ShiftExpression
 RelationalExpression `>` ShiftExpression
 RelationalExpression `<=` ShiftExpression
 RelationalExpression `>=` ShiftExpression
 RelationalExpression `instanceof` ShiftExpression
 RelationalExpression `in` ShiftExpression
EqualityExpression
EqualityExpression[In, Yield, Await] :
 RelationalExpression[?In, ?Yield, ?Await]
 EqualityExpression[?In, ?Yield, ?Await] `==` RelationalExpression[?In, ?Yield, ?Await]
 EqualityExpression[?In, ?Yield, ?Await] `!=` RelationalExpression[?In, ?Yield, ?Await]
 EqualityExpression[?In, ?Yield, ?Await] `===` RelationalExpression[?In, ?Yield, ?Await]
 EqualityExpression[?In, ?Yield, ?Await] `!==` RelationalExpression[?In, ?Yield, ?Await]
EqualityExpression :
 EqualityExpression `==` RelationalExpression
 EqualityExpression `!=` RelationalExpression
 EqualityExpression `===` RelationalExpression
 EqualityExpression `!==` RelationalExpression
BitwiseANDExpression
BitwiseANDExpression[In, Yield, Await] :
 EqualityExpression[?In, ?Yield, ?Await]
 BitwiseANDExpression[?In, ?Yield, ?Await] `&` EqualityExpression[?In, ?Yield, ?Await]
BitwiseANDExpression : BitwiseANDExpression `&` EqualityExpression
BitwiseXORExpression
BitwiseXORExpression[In, Yield, Await] :
 BitwiseANDExpression[?In, ?Yield, ?Await]
 BitwiseXORExpression[?In, ?Yield, ?Await] `^` BitwiseANDExpression[?In, ?Yield, ?Await]
BitwiseXORExpression : BitwiseXORExpression `^` BitwiseANDExpression
BitwiseORExpression
BitwiseORExpression[In, Yield, Await] :
 BitwiseXORExpression[?In, ?Yield, ?Await]
 BitwiseORExpression[?In, ?Yield, ?Await] `|` BitwiseXORExpression[?In, ?Yield, ?Await]
BitwiseORExpression : BitwiseORExpression `|` BitwiseXORExpression
LogicalANDExpression
LogicalANDExpression[In, Yield, Await] :
 BitwiseORExpression[?In, ?Yield, ?Await]
 LogicalANDExpression[?In, ?Yield, ?Await] `&&` BitwiseORExpression[?In, ?Yield, ?Await]
LogicalANDExpression : LogicalANDExpression `&&` BitwiseORExpression
LogicalORExpression
LogicalORExpression[In, Yield, Await] :
 LogicalANDExpression[?In, ?Yield, ?Await]
 LogicalORExpression[?In, ?Yield, ?Await] `||` LogicalANDExpression[?In, ?Yield, ?Await]
LogicalORExpression : LogicalORExpression `||` LogicalANDExpression
ConditionalExpression
ConditionalExpression[In, Yield, Await] :
 LogicalORExpression[?In, ?Yield, ?Await]
 LogicalORExpression[?In, ?Yield, ?Await] `?` AssignmentExpression[+In, ?Yield, ?Await] `:` AssignmentExpression[?In, ?Yield, ?Await]
AssignmentExpression
AssignmentExpression[In, Yield, Await] :
 ConditionalExpression[?In, ?Yield, ?Await]
 [+Yield] YieldExpression[?In, ?Await]
 ArrowFunction[?In, ?Yield, ?Await]
 AsyncArrowFunction[?In, ?Yield, ?Await]
 LeftHandSideExpression[?Yield, ?Await] `=` AssignmentExpression[?In, ?Yield, ?Await] #assignment
 LeftHandSideExpression[?Yield, ?Await] AssignmentOperator AssignmentExpression[?In, ?Yield, ?Await]
AssignmentExpression :
 ArrowFunction
 AsyncArrowFunction
AssignmentExpression :
 YieldExpression
 LeftHandSideExpression `=` AssignmentExpression
 LeftHandSideExpression AssignmentOperator AssignmentExpression
AssignmentExpression :
 YieldExpression
 ArrowFunction
 AsyncArrowFunction
 LeftHandSideExpression `=` AssignmentExpression
 LeftHandSideExpression AssignmentOperator AssignmentExpression

In certain circumstances when processing an instance of the production |AssignmentExpression| the following grammar is used to refine the interpretation of |LeftHandSideExpression|:

AssignmentPattern
AssignmentPattern[Yield, Await] :
 ObjectAssignmentPattern[?Yield, ?Await]
 ArrayAssignmentPattern[?Yield, ?Await]
ObjectAssignmentPattern
ObjectAssignmentPattern[Yield, Await] :
 `{` `}`
 `{` AssignmentRestProperty[?Yield, ?Await] `}`
 `{` AssignmentPropertyList[?Yield, ?Await] `}`
 `{` AssignmentPropertyList[?Yield, ?Await] `,` AssignmentRestProperty[?Yield, ?Await]? `}`
ObjectAssignmentPattern :
 `{` AssignmentPropertyList `}`
 `{` AssignmentPropertyList `,` `}`
ArrayAssignmentPattern
ArrayAssignmentPattern[Yield, Await] :
 `[` Elision? AssignmentRestElement[?Yield, ?Await]? `]`
 `[` AssignmentElementList[?Yield, ?Await] `]`
 `[` AssignmentElementList[?Yield, ?Await] `,` Elision? AssignmentRestElement[?Yield, ?Await]? `]`
AssignmentPropertyList
AssignmentPropertyList[Yield, Await] :
 AssignmentProperty[?Yield, ?Await]
 AssignmentPropertyList[?Yield, ?Await] `,` AssignmentProperty[?Yield, ?Await]
AssignmentElementList
AssignmentElementList[Yield, Await] :
 AssignmentElisionElement[?Yield, ?Await]
 AssignmentElementList[?Yield, ?Await] `,` AssignmentElisionElement[?Yield, ?Await]
AssignmentElisionElement
AssignmentElisionElement[Yield, Await] :
Elision? AssignmentElement[?Yield, ?Await]
AssignmentProperty
AssignmentProperty[Yield, Await] :
 IdentifierReference[?Yield, ?Await] Initializer[+In, ?Yield, ?Await]?
 PropertyName[?Yield, ?Await] `:` AssignmentElement[?Yield, ?Await]
AssignmentElement
AssignmentElement[Yield, Await] :
 DestructuringAssignmentTarget[?Yield, ?Await] Initializer[+In, ?Yield, ?Await]?
AssignmentRestElement
AssignmentRestElement[Yield, Await] :
 `...` DestructuringAssignmentTarget[?Yield, ?Await]
DestructuringAssignmentTarget
DestructuringAssignmentTarget[Yield, Await] :
 LeftHandSideExpression[?Yield, ?Await]
AssignmentOperator
AssignmentOperator : one of
 `*=` `/=` `%=` `+=` `-=` `<<=` `>>=` `>>>=` `&=` `^=` `|=` `**=`
Expression
Expression[In, Yield, Await] :
 AssignmentExpression[?In, ?Yield, ?Await]
 Expression[?In, ?Yield, ?Await] `,` AssignmentExpression[?In, ?Yield, ?Await]
Expression :
 AssignmentExpression
 Expression `,` AssignmentExpression
Statement
Statement[Yield, Await, Return] :
 BlockStatement[?Yield, ?Await, ?Return]
 VariableStatement[?Yield, ?Await]
 EmptyStatement
 ExpressionStatement[?Yield, ?Await]
 IfStatement[?Yield, ?Await, ?Return]
 BreakableStatement[?Yield, ?Await, ?Return]
 ContinueStatement[?Yield, ?Await]
 BreakStatement[?Yield, ?Await]
 [+Return] ReturnStatement[?Yield, ?Await]
 WithStatement[?Yield, ?Await, ?Return]
 LabelledStatement[?Yield, ?Await, ?Return]
 ThrowStatement[?Yield, ?Await]
 TryStatement[?Yield, ?Await, ?Return]
 DebuggerStatement
Statement :
 VariableStatement
 EmptyStatement
 ExpressionStatement
 ContinueStatement
 BreakStatement
 ReturnStatement
 ThrowStatement
 DebuggerStatement
Statement :
 VariableStatement
 EmptyStatement
 ExpressionStatement
 ContinueStatement
 ReturnStatement
 ThrowStatement
 DebuggerStatement
Statement :
 VariableStatement
 EmptyStatement
 ExpressionStatement
 BreakStatement
 ReturnStatement
 ThrowStatement
 DebuggerStatement
Statement :
 EmptyStatement
 ExpressionStatement
 ContinueStatement
 BreakStatement
 ReturnStatement
 ThrowStatement
 DebuggerStatement
Statement :
 VariableStatement
 EmptyStatement
 ExpressionStatement
 ContinueStatement
 BreakStatement
 ThrowStatement
 DebuggerStatement
Declaration
Declaration[Yield, Await] :
 HoistableDeclaration[?Yield, ?Await, ~Default]
 ClassDeclaration[?Yield, ?Await, ~Default]
 LexicalDeclaration[+In, ?Yield, ?Await]
HoistableDeclaration
HoistableDeclaration[Yield, Await, Default] :
 FunctionDeclaration[?Yield, ?Await, ?Default]
 GeneratorDeclaration[?Yield, ?Await, ?Default]
 AsyncFunctionDeclaration[?Yield, ?Await, ?Default]
 AsyncGeneratorDeclaration[?Yield, ?Await, ?Default]
HoistableDeclaration :
 GeneratorDeclaration
 AsyncFunctionDeclaration
 AsyncGeneratorDeclaration
HoistableDeclaration : FunctionDeclaration
BreakableStatement
BreakableStatement[Yield, Await, Return] :
 IterationStatement[?Yield, ?Await, ?Return]
 SwitchStatement[?Yield, ?Await, ?Return]
BreakableStatement :
 IterationStatement
 SwitchStatement
BlockStatement
BlockStatement[Yield, Await, Return] :
 Block[?Yield, ?Await, ?Return]
Block
Block :
 `{` StatementList `}`
Block[Yield, Await, Return] :
 `{` StatementList[?Yield, ?Await, ?Return]? `}`
Block : `{` `}`
StatementList
StatementList[Return] :
 ReturnStatement
 ExpressionStatement
StatementList :
 ReturnStatement
 ExpressionStatement
StatementList[Return, In] :
 ReturnStatement
 ExpressionStatement
StatementList :
 ReturnStatement
 ExpressionStatement[+In]
StatementList :
 ReturnStatement
 ExpressionStatement_In
StatementList :
 ReturnStatement
 ExpressionStatement[~In]
StatementList[Return] :
 [+Return] ReturnStatement
 ExpressionStatement
StatementList :
 ExpressionStatement
StatementList[Return] :
 [~Return] ReturnStatement
 ExpressionStatement
StatementList[Yield, Await, Return] :
 StatementListItem[?Yield, ?Await, ?Return]
 StatementList[?Yield, ?Await, ?Return] StatementListItem[?Yield, ?Await, ?Return]
StatementListItem
StatementListItem[Yield, Await, Return] :
 Statement[?Yield, ?Await, ?Return]
 Declaration[?Yield, ?Await]
StatementListItem : Declaration
LexicalDeclaration
LexicalDeclaration[In, Yield, Await] :
 LetOrConst BindingList[?In, ?Yield, ?Await] `;`
LetOrConst
LetOrConst : one of
 `let` `const`
BindingList
BindingList[In, Yield, Await] :
 LexicalBinding[?In, ?Yield, ?Await]
 BindingList[?In, ?Yield, ?Await] `,` LexicalBinding[?In, ?Yield, ?Await]
LexicalBinding
LexicalBinding[In, Yield, Await] :
 BindingIdentifier[?Yield, ?Await] Initializer[?In, ?Yield, ?Await]?
 BindingPattern[?Yield, ?Await] Initializer[?In, ?Yield, ?Await]
VariableStatement
VariableStatement[Yield, Await] :
 `var` VariableDeclarationList[+In, ?Yield, ?Await] `;`
VariableDeclarationList
VariableDeclarationList[In, Yield, Await] :
 VariableDeclaration[?In, ?Yield, ?Await]
 VariableDeclarationList[?In, ?Yield, ?Await] `,` VariableDeclaration[?In, ?Yield, ?Await]
VariableDeclaration
VariableDeclaration :
 BindingIdentifier Initializer?
VariableDeclaration :
 BindingIdentifier
 BindingIdentifier Initializer
VariableDeclaration :
 BindingIdentifier Initializer[+In]?
VariableDeclaration :
 BindingIdentifier
 BindingIdentifier Initializer_In
VariableDeclaration[In] :
 BindingIdentifier Initializer[?In]
VariableDeclaration :
 BindingIdentifier Initializer
VariableDeclaration[In, Yield, Await] :
 BindingIdentifier[?Yield, ?Await] Initializer[?In, ?Yield, ?Await]?
 BindingPattern[?Yield, ?Await] Initializer[?In, ?Yield, ?Await]
BindingPattern
BindingPattern[Yield, Await] :
 ObjectBindingPattern[?Yield, ?Await]
 ArrayBindingPattern[?Yield, ?Await]
ObjectBindingPattern
ObjectBindingPattern[Yield, Await] :
 `{` `}`
 `{` BindingRestProperty[?Yield, ?Await] `}`
 `{` BindingPropertyList[?Yield, ?Await] `}`
 `{` BindingPropertyList[?Yield, ?Await] `,` BindingRestProperty[?Yield, ?Await]? `}`
ObjectBindingPattern :
 `{` BindingPropertyList `}`
 `{` BindingPropertyList `,` `}`
ArrayBindingPattern
ArrayBindingPattern[Yield, Await] :
 `[` Elision? BindingRestElement[?Yield, ?Await]? `]`
 `[` BindingElementList[?Yield, ?Await] `]`
 `[` BindingElementList[?Yield, ?Await] `,` Elision? BindingRestElement[?Yield, ?Await]? `]`
BindingPropertyList
BindingPropertyList[Yield, Await] :
 BindingProperty[?Yield, ?Await]
 BindingPropertyList[?Yield, ?Await] `,` BindingProperty[?Yield, ?Await]
BindingElementList
BindingElementList[Yield, Await] :
 BindingElisionElement[?Yield, ?Await]
 BindingElementList[?Yield, ?Await] `,` BindingElisionElement[?Yield, ?Await]
BindingElisionElement
BindingElisionElement[Yield, Await] :
Elision? BindingElement[?Yield, ?Await]
BindingProperty
BindingProperty[Yield, Await] :
 SingleNameBinding[?Yield, ?Await]
 PropertyName[?Yield, ?Await] `:` BindingElement[?Yield, ?Await]
BindingElement
BindingElement[Yield, Await] :
 SingleNameBinding[?Yield, ?Await]
 BindingPattern[?Yield, ?Await] Initializer[+In, ?Yield, ?Await]?
SingleNameBinding
SingleNameBinding[Yield, Await] :
 BindingIdentifier[?Yield, ?Await] Initializer[+In, ?Yield, ?Await]?
BindingRestElement
BindingRestElement[Yield, Await] :
 `...` BindingIdentifier[?Yield, ?Await]
 `...` BindingPattern[?Yield, ?Await]
EmptyStatement
EmptyStatement :
 `;`
ExpressionStatement
ExpressionStatement[Yield, Await] :
 [lookahead <! {`{`, `function`, `async` [no |LineTerminator| here] `function`, `class`, `let [`}] Expression[+In, ?Yield, ?Await] `;`
IfStatement
IfStatement[Yield, Await, Return] :
 `if` `(` Expression[+In, ?Yield, ?Await] `)` Statement[?Yield, ?Await, ?Return] `else` Statement[?Yield, ?Await, ?Return]
 `if` `(` Expression[+In, ?Yield, ?Await] `)` Statement[?Yield, ?Await, ?Return]
IfStatement :
 `if` `(` Expression `)` Statement `else` Statement
 `if` `(` Expression `)` Statement
IfStatement : `if` `(` Expression `)` Statement
IfStatement[Yield, Await, Return] :
 `if` `(` Expression[+In, ?Yield, ?Await] `)` FunctionDeclaration[?Yield, ?Await, ~Default] `else` Statement[?Yield, ?Await, ?Return]
 `if` `(` Expression[+In, ?Yield, ?Await] `)` Statement[?Yield, ?Await, ?Return] `else` FunctionDeclaration[?Yield, ?Await, ~Default]
 `if` `(` Expression[+In, ?Yield, ?Await] `)` FunctionDeclaration[?Yield, ?Await, ~Default] `else` FunctionDeclaration[?Yield, ?Await, ~Default]
 `if` `(` Expression[+In, ?Yield, ?Await] `)` FunctionDeclaration[?Yield, ?Await, ~Default]
IterationStatement
IterationStatement :
 `for` `(` LexicalDeclaration Expression? `;` Expression? `)` Statement
IterationStatement :
 `for` `(` LexicalDeclaration `;` Expression? `)` Statement
 `for` `(` LexicalDeclaration Expression `;` Expression? `)` Statement
IterationStatement :
 `for` `(` LexicalDeclaration `;` `)` Statement
 `for` `(` LexicalDeclaration `;` Expression `)` Statement
 `for` `(` LexicalDeclaration Expression `;` `)` Statement
 `for` `(` LexicalDeclaration Expression `;` Expression `)` Statement
IterationStatement[Yield, Await, Return] :
 `do` Statement[?Yield, ?Await, ?Return] `while` `(` Expression[+In, ?Yield, ?Await] `)` `;`
 `while` `(` Expression[+In, ?Yield, ?Await] `)` Statement[?Yield, ?Await, ?Return]
 `for` `(` [lookahead <! {`let [`}] Expression[~In, ?Yield, ?Await]? `;` Expression[+In, ?Yield, ?Await]? `;` Expression[+In, ?Yield, ?Await]? `)` Statement[?Yield, ?Await, ?Return]
 `for` `(` `var` VariableDeclarationList[~In, ?Yield, ?Await] `;` Expression[+In, ?Yield, ?Await]? `;` Expression[+In, ?Yield, ?Await]? `)` Statement[?Yield, ?Await, ?Return]
 `for` `(` LexicalDeclaration[~In, ?Yield, ?Await] Expression[+In, ?Yield, ?Await]? `;` Expression[+In, ?Yield, ?Await]? `)` Statement[?Yield, ?Await, ?Return]
 `for` `(` [lookahead <! {`let [`}] LeftHandSideExpression[?Yield, ?Await] `in` Expression[+In, ?Yield, ?Await] `)` Statement[?Yield, ?Await, ?Return]
 `for` `(` `var` ForBinding[?Yield, ?Await] `in` Expression[+In, ?Yield, ?Await] `)` Statement[?Yield, ?Await, ?Return]
 `for` `(` ForDeclaration[?Yield, ?Await] `in` Expression[+In, ?Yield, ?Await] `)` Statement[?Yield, ?Await, ?Return]
 `for` `(` [lookahead != `let` ] LeftHandSideExpression[?Yield, ?Await] `of` AssignmentExpression[+In, ?Yield, ?Await] `)` Statement[?Yield, ?Await, ?Return]
 `for` `(` `var` ForBinding[?Yield, ?Await] `of` AssignmentExpression[+In, ?Yield, ?Await] `)` Statement[?Yield, ?Await, ?Return]
 `for` `(` ForDeclaration[?Yield, ?Await] `of` AssignmentExpression[+In, ?Yield, ?Await] `)` Statement[?Yield, ?Await, ?Return]
 [+Await] `for` `await` `(` [lookahead != `let` ] LeftHandSideExpression[?Yield, ?Await] `of` AssignmentExpression[+In, ?Yield, ?Await] `)` Statement[?Yield, ?Await, ?Return]
 [+Await] `for` `await` `(` `var` ForBinding[?Yield, ?Await] `of` AssignmentExpression[+In, ?Yield, ?Await] `)` Statement[?Yield, ?Await, ?Return]
 [+Await] `for` `await` `(` ForDeclaration[?Yield, ?Await] `of` AssignmentExpression[+In, ?Yield, ?Await] `)` Statement[?Yield, ?Await, ?Return]
IterationStatement :
 `do` Statement `while` `(` Expression `)` `;`
 `while` `(` Expression `)` Statement
 `for` `(` Expression? `;` Expression? `;` Expression? `)` Statement
 `for` `(` `var` VariableDeclarationList `;` Expression? `;` Expression? `)` Statement
 `for` `(` LexicalDeclaration Expression? `;` Expression? `)` Statement
 `for` `(` LeftHandSideExpression `in` Expression `)` Statement
 `for` `(` `var` ForBinding `in` Expression `)` Statement
 `for` `(` ForDeclaration `in` Expression `)` Statement
 `for` `(` LeftHandSideExpression `of` AssignmentExpression `)` Statement
 `for` `(` `var` ForBinding `of` AssignmentExpression `)` Statement
 `for` `(` ForDeclaration `of` AssignmentExpression `)` Statement
 `for` `await` `(` LeftHandSideExpression `of` AssignmentExpression `)` Statement
 `for` `await` `(` `var` ForBinding `of` AssignmentExpression `)` Statement
 `for` `await` `(` ForDeclaration `of` AssignmentExpression `)` Statement
IterationStatement :
 `for` `(` Expression? `;` Expression? `;` Expression? `)` Statement
 `for` `(` `var` VariableDeclarationList `;` Expression? `;` Expression? `)` Statement
 `for` `(` LexicalDeclaration Expression? `;` Expression? `)` Statement
IterationStatement :
 `for` `(` LeftHandSideExpression `in` Expression `)` Statement
 `for` `(` LeftHandSideExpression `of` AssignmentExpression `)` Statement
 `for` `await` `(` LeftHandSideExpression `of` AssignmentExpression `)` Statement
IterationStatement :
 `for` `(` ForDeclaration `in` Expression `)` Statement
 `for` `(` ForDeclaration `of` AssignmentExpression `)` Statement
 `for` `await` `(` ForDeclaration `of` AssignmentExpression `)` Statement
IterationStatement :
 `for` `(` LeftHandSideExpression `in` Expression `)` Statement
 `for` `(` `var` ForBinding `in` Expression `)` Statement
 `for` `(` ForDeclaration `in` Expression `)` Statement
 `for` `(` LeftHandSideExpression `of` AssignmentExpression `)` Statement
 `for` `(` `var` ForBinding `of` AssignmentExpression `)` Statement
 `for` `(` ForDeclaration `of` AssignmentExpression `)` Statement
 `for` `await` `(` LeftHandSideExpression `of` AssignmentExpression `)` Statement
 `for` `await` `(` `var` ForBinding `of` AssignmentExpression `)` Statement
 `for` `await` `(` ForDeclaration `of` AssignmentExpression `)` Statement
IterationStatement :
 `for` `(` LeftHandSideExpression `of` AssignmentExpression `)` Statement
 `for` `await` `(` LeftHandSideExpression `of` AssignmentExpression `)` Statement
IterationStatement :
 `for` `(` `var` ForBinding `of` AssignmentExpression `)` Statement
 `for` `await` `(` `var` ForBinding `of` AssignmentExpression `)` Statement
IterationStatement :
 `for` `(` ForDeclaration `of` AssignmentExpression `)` Statement
 `for` `await` `(` ForDeclaration `of` AssignmentExpression `)` Statement
IterationStatement :
 `for` `(` ForDeclaration `in` Expression `)` Statement
 `for` `await` `(` LeftHandSideExpression `of` AssignmentExpression `)` Statement
IterationStatement :
 `for` `(` LeftHandSideExpression `of` AssignmentExpression `)` Statement
 `for` `await` `(` `var` ForBinding `of` AssignmentExpression `)` Statement
IterationStatement : `for` `await` `(` LeftHandSideExpression `of` AssignmentExpression `)` Statement
IterationStatement : `for` `await` `(` `var` ForBinding `of` AssignmentExpression `)` Statement
IterationStatement : `for` `await` `(` ForDeclaration `of` AssignmentExpression `)` Statement
IterationStatement :
 `for` `(` LeftHandSideExpression `of` AssignmentExpression `)` Statement
 `for` `(` `var` ForBinding `of` AssignmentExpression `)` Statement
 `for` `(` ForDeclaration `of` AssignmentExpression `)` Statement
IterationStatement :
 `do` Statement `while` `(` Expression `)` `;`
 `while` `(` Expression `)` Statement
 `for` `(` Expression? `;` Expression? `;` Expression? `)` Statement
 `for` `(` `var` VariableDeclarationList `;` Expression? `;` Expression? `)` Statement
 `for` `(` LexicalDeclaration Expression? `;` Expression? `)` Statement
 `for` `(` LeftHandSideExpression `in` Expression `)` Statement
 `for` `(` `var` ForBinding `in` Expression `)` Statement
 `for` `(` ForDeclaration `in` Expression `)` Statement
IterationStatement[Yield, Await, Return] :
 `for` `(` `var` BindingIdentifier[?Yield, ?Await] Initializer[~In, ?Yield, ?Await] `in` Expression[+In, ?Yield, ?Await] `)` Statement[?Yield, ?Await, ?Return]
ForDeclaration
ForDeclaration[Yield, Await] :
 LetOrConst ForBinding[?Yield, ?Await]
ForBinding
ForBinding[Yield, Await] :
 BindingIdentifier[?Yield, ?Await]
 BindingPattern[?Yield, ?Await]
ContinueStatement
ContinueStatement[Yield, Await] :
 `continue` `;`
 `continue` [no LineTerminator here] LabelIdentifier[?Yield, ?Await] `;`
ContinueStatement : `continue` `;`
BreakStatement
BreakStatement[Yield, Await] :
 `break` `;`
 `break` [no LineTerminator here] LabelIdentifier[?Yield, ?Await] `;`
ReturnStatement
ReturnStatement[Yield, Await] :
 `return` `;`
 `return` [no LineTerminator here] Expression[+In, ?Yield, ?Await] `;`
ReturnStatement : `return` `;`
WithStatement
WithStatement[Yield, Await, Return] :
 `with` `(` Expression[+In, ?Yield, ?Await] `)` Statement[?Yield, ?Await, ?Return]
WithStatement : `with` `(` Expression `)` Statement
SwitchStatement
SwitchStatement[Yield, Await, Return] :
 `switch` `(` Expression[+In, ?Yield, ?Await] `)` CaseBlock[?Yield, ?Await, ?Return]
CaseBlock
CaseBlock[Yield, Await, Return] :
 `{` CaseClauses[?Yield, ?Await, ?Return]? `}`
 `{` CaseClauses[?Yield, ?Await, ?Return]? DefaultClause[?Yield, ?Await, ?Return] CaseClauses[?Yield, ?Await, ?Return]? `}`
CaseBlock : `{` `}`
CaseClauses
CaseClauses[Yield, Await, Return] :
 CaseClause[?Yield, ?Await, ?Return]
 CaseClauses[?Yield, ?Await, ?Return] CaseClause[?Yield, ?Await, ?Return]
CaseClause
CaseClause[Yield, Await, Return] :
 `case` Expression[+In, ?Yield, ?Await] `:` StatementList[?Yield, ?Await, ?Return]?
CaseClause : `case` Expression `:` StatementList?
DefaultClause
DefaultClause[Yield, Await, Return] :
 `default` `:` StatementList[?Yield, ?Await, ?Return]?
DefaultClause : `default` `:` StatementList?
LabelledStatement
LabelledStatement[Yield, Await, Return] :
 LabelIdentifier[?Yield, ?Await] `:` LabelledItem[?Yield, ?Await, ?Return]
LabelledStatement :
 LabelIdentifier `:` LabelledItem
LabelledItem
LabelledItem[Yield, Await, Return] :
 Statement[?Yield, ?Await, ?Return]
 FunctionDeclaration[?Yield, ?Await, ~Default]
LabelledItem : FunctionDeclaration
ThrowStatement
ThrowStatement :
 `throw` [no LineTerminator here] Expression `;`
ThrowStatement[Yield, Await] :
 `throw` [no LineTerminator here] Expression[+In, ?Yield, ?Await] `;`
TryStatement
TryStatement[Yield, Await, Return] :
 `try` Block[?Yield, ?Await, ?Return] Catch[?Yield, ?Await, ?Return]
 `try` Block[?Yield, ?Await, ?Return] Finally[?Yield, ?Await, ?Return]
 `try` Block[?Yield, ?Await, ?Return] Catch[?Yield, ?Await, ?Return] Finally[?Yield, ?Await, ?Return]
TryStatement : `try` Block Finally
Catch
Catch[Yield, Await, Return] :
 `catch` `(` CatchParameter[?Yield, ?Await] `)` Block[?Yield, ?Await, ?Return]
Finally
Finally[Yield, Await, Return] :
 `finally` Block[?Yield, ?Await, ?Return]
CatchParameter
CatchParameter[Yield, Await] :
 BindingIdentifier[?Yield, ?Await]
 BindingPattern[?Yield, ?Await]
DebuggerStatement
DebuggerStatement :
 `debugger` `;`
FunctionDeclaration
FunctionDeclaration[Yield, Await, Default] :
 `function` BindingIdentifier[?Yield, ?Await] `(` FormalParameters[~Yield, ~Await] `)` `{` FunctionBody[~Yield, ~Await] `}`
 [+Default] `function` `(` FormalParameters[~Yield, ~Await] `)` `{` FunctionBody[~Yield, ~Await] `}`
FunctionDeclaration : `function` BindingIdentifier `(` FormalParameters `)` `{` FunctionBody `}`
FunctionExpression
FunctionExpression :
 `function` BindingIdentifier[~Yield, ~Await]? `(` FormalParameters[~Yield, ~Await] `)` `{` FunctionBody[~Yield, ~Await] `}`
FunctionExpression : `function` BindingIdentifier? `(` FormalParameters `)` `{` FunctionBody `}`
UniqueFormalParameters
UniqueFormalParameters[Yield, Await] :
 FormalParameters[?Yield, ?Await]
FormalParameters
FormalParameters[Yield, Await] :
 FormalParameters[?Yield, ?Await]
FormalParameterList
FormalParameterList[Yield, Await] :
 FormalParameter[?Yield, ?Await]
 FormalParameterList[?Yield, ?Await] `,` FormalParameter[?Yield, ?Await]
FunctionRestParameter
FunctionRestParameter[Yield, Await] :
 BindingRestElement[?Yield, ?Await]
FormalParameter
FormalParameter[Yield, Await] :
 BindingElement[?Yield, ?Await]
FunctionBody
FunctionBody[Yield, Await] :
 FunctionStatementList[?Yield, ?Await]
FunctionStatementList
FunctionStatementList[Yield, Await] :
StatementList[?Yield, ?Await, +Return]?
FunctionStatementList : [empty]
ArrowFunction
ArrowFunction[In, Yield, Await] :
 ArrowParameters[?Yield, ?Await] [no LineTerminator here] `=>` ConciseBody[?In]
ArrowParameters
ArrowParameters[Yield, Await] :
 BindingIdentifier[?Yield, ?Await]
 CoverParenthesizedExpressionAndArrowParameterList[?Yield, ?Await] #parencover
ConciseBody
ConciseBody[In] :
 [lookahead != `{` ] AssignmentExpression[?In, ~Yield, ~Await]
 `{` FunctionBody[~Yield, ~Await] `}`

When the production |ArrowParameters| is recognized the following grammar is used to refine the interpretation of |CoverParenthesizedExpressionAndArrowParameterList|:

ArrowFormalParameters
ArrowFormalParameters[Yield, Await] :
 `(` UniqueFormalParameters[?Yield, ?Await] `)`
AsyncArrowFunction
AsyncArrowFunction[In, Yield, Await] :
 `async` [no LineTerminator here] AsyncArrowBindingIdentifier[?Yield] [no LineTerminator here] `=>` AsyncConciseBody[?In]
 CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await] [no LineTerminator here] `=>` AsyncConciseBody[?In] #callcover
AsyncArrowFunction : `async` [no LineTerminator here] AsyncArrowBindingIdentifier [no LineTerminator here] `=>` AsyncConciseBody
AsyncArrowFunction : CoverCallExpressionAndAsyncArrowHead [no LineTerminator here] `=>` AsyncConciseBody
AsyncConciseBody
AsyncConciseBody[In] :
 [lookahead != `{`] AssignmentExpression[?In, ~Yield, +Await]
 `{` AsyncFunctionBody `}`
AsyncConciseBody : [lookahead != `{`] AssignmentExpression
AsyncConciseBody : `{` AsyncFunctionBody `}`

When the production |AsyncArrowFunction| is recognized the following grammar is used to refine the interpretation of |CoverParenthesizedExpressionAndArrowParameterList|:

AsyncArrowHead
AsyncArrowHead :
 `async` [no LineTerminator here] ArrowFormalParameters[~Yield, +Await]
MethodDefinition
MethodDefinition[Yield, Await] :
 PropertyName[?Yield, ?Await] `(` UniqueFormalParameters[~Yield, ~Await] `)` `{` FunctionBody[~Yield, ~Await] `}`
 GeneratorMethod[?Yield, ?Await]
 AsyncMethod[?Yield, ?Await]
 AsyncGeneratorMethod[?Yield, ?Await]
 `get` PropertyName[?Yield, ?Await] `(` `)` `{` FunctionBody[~Yield, ~Await] `}`
 `set` PropertyName[?Yield, ?Await] `(` PropertySetParameterList `)` `{` FunctionBody[~Yield, ~Await] `}`
MethodDefinition :
 PropertyName `(` UniqueFormalParameters `)` `{` FunctionBody `}`
 `get` PropertyName `(` `)` `{` FunctionBody `}`
 `set` PropertyName `(` PropertySetParameterList `)` `{` FunctionBody `}`
MethodDefinition :
 GeneratorMethod
 AsyncMethod
 AsyncGeneratorMethod
 `get` PropertyName `(` `)` `{` FunctionBody `}`
 `set` PropertyName `(` PropertySetParameterList `)` `{` FunctionBody `}`
PropertySetParameterList
PropertySetParameterList :
 FormalParameter[~Yield, ~Await]
GeneratorMethod
GeneratorMethod[Yield, Await] :
 `*` PropertyName[?Yield, ?Await] `(` UniqueFormalParameters[+Yield, ~Await] `)` `{` GeneratorBody `}`
GeneratorDeclaration
GeneratorDeclaration[Yield, Await, Default] :
 `function` `*` BindingIdentifier[?Yield, ?Await] `(` FormalParameters[+Yield, ~Await] `)` `{` GeneratorBody `}`
 [+Default] `function` `*` `(` FormalParameters[+Yield, ~Await] `)` `{` GeneratorBody `}`
GeneratorDeclaration : `function` `*` BindingIdentifier `(` FormalParameters `)` `{` GeneratorBody `}`
GeneratorExpression
GeneratorExpression :
 `function` `*` BindingIdentifier[+Yield, ~Await]? `(` FormalParameters[+Yield, ~Await] `)` `{` GeneratorBody `}`
GeneratorExpression : `function` `*` BindingIdentifier? `(` FormalParameters `)` `{` GeneratorBody `}`
GeneratorBody
GeneratorBody :
 FunctionBody[+Yield, ~Await]
YieldExpression
YieldExpression[In, Await] :
 `yield` [no LineTerminator here] `*` AssignmentExpression[?In, +Yield, ?Await]
 `yield` [no LineTerminator here] AssignmentExpression[?In, +Yield, ?Await]
YieldExpression[In, Await] :
 `yield`
 `yield` [no LineTerminator here] AssignmentExpression[?In, +Yield, ?Await]
 `yield` [no LineTerminator here] `*` AssignmentExpression[?In, +Yield, ?Await]
AsyncMethod
AsyncMethod[Yield, Await] :
 `async` [no LineTerminator here] PropertyName[?Yield, ?Await] `(` UniqueFormalParameters[~Yield, +Await] `)` `{` AsyncFunctionBody `}`
AsyncMethod : `async` [no LineTerminator here] PropertyName `(` UniqueFormalParameters `)` `{` AsyncFunctionBody `}`
AsyncFunctionDeclaration
AsyncFunctionDeclaration[Yield, Await, Default] :
 `async` [no LineTerminator here] `function` BindingIdentifier[?Yield, ?Await] `(` FormalParameters[~Yield, +Await] `)` `{` AsyncFunctionBody `}`
 [+Default] `async` [no LineTerminator here] `function` `(` FormalParameters[~Yield, +Await] `)` `{` AsyncFunctionBody `}`
AsyncFunctionDeclaration : `async` [no LineTerminator here] `function` BindingIdentifier `(` FormalParameters `)` `{` AsyncFunctionBody `}`
AsyncFunctionDeclaration : `async` [no LineTerminator here] `function` `(` FormalParameters `)` `{` AsyncFunctionBody `}`
AsyncFunctionExpression
AsyncFunctionExpression :
 `async` [no LineTerminator here] `function` `(` FormalParameters[~Yield, +Await] `)` `{` AsyncFunctionBody `}`
 `async` [no LineTerminator here] `function` BindingIdentifier[~Yield, +Await] `(` FormalParameters[~Yield, +Await] `)` `{` AsyncFunctionBody `}`
AsyncFunctionExpression : `async` [no LineTerminator here] `function` `(` FormalParameters `)` `{` AsyncFunctionBody `}`
AsyncFunctionExpression : `async` [no LineTerminator here] `function` BindingIdentifier `(` FormalParameters `)` `{` AsyncFunctionBody `}`
AsyncFunctionBody
AsyncFunctionBody :
 FunctionBody[~Yield, +Await]
AsyncFunctionBody : FunctionBody
AwaitExpression
AwaitExpression[Yield] :
 `await` UnaryExpression[?Yield, +Await]
AwaitExpression : `await` UnaryExpression
ClassDeclaration
ClassDeclaration[Yield, Await, Default] :
 `class` BindingIdentifier[?Yield, ?Await] ClassTail[?Yield, ?Await]
 [+Default] `class` ClassTail[?Yield, ?Await]
ClassDeclaration : `class` BindingIdentifier ClassTail
ClassExpression
ClassExpression[Yield, Await] :
 `class` BindingIdentifier[?Yield, ?Await]? ClassTail[?Yield, ?Await]
ClassTail
ClassTail[Yield, Await] :
ClassHeritage[?Yield, ?Await]? `{` ClassBody[?Yield, ?Await]? `}`
ClassHeritage
ClassHeritage[Yield, Await] :
 `extends` LeftHandSideExpression[?Yield, ?Await]
ClassBody
ClassBody[Yield, Await] :
 ClassElementList[?Yield, ?Await]
ClassElementList
ClassElementList[Yield, Await] :
 ClassElement[?Yield, ?Await]
 ClassElementList[?Yield, ?Await] ClassElement[?Yield, ?Await]
ClassElement
ClassElement[Yield, Await] :
 MethodDefinition[?Yield, ?Await]
 `static` MethodDefinition[?Yield, ?Await]
 `;`
Script
Script :
ScriptBody?
ScriptBody
ScriptBody :
 StatementList[~Yield, ~Await, ~Return]
Module
Module :
ModuleBody?
ModuleBody
ModuleBody :
 ModuleItemList
ModuleItemList
ModuleItemList :
 ModuleItem
 ModuleItemList ModuleItem
ModuleItem
ModuleItem :
 ImportDeclaration
 ExportDeclaration
 StatementListItem[~Yield, ~Await, ~Return]
ModuleItem :
 ImportDeclaration
 ExportDeclaration
ModuleItem :
 ImportDeclaration
 StatementListItem
ModuleItem :
 ExportDeclaration
 StatementListItem
ImportDeclaration
ImportDeclaration :
 `import` ImportClause FromClause `;`
 `import` ModuleSpecifier `;`
ImportClause
ImportClause :
 ImportedDefaultBinding
 NameSpaceImport
 NamedImports
 ImportedDefaultBinding `,` NameSpaceImport
 ImportedDefaultBinding `,` NamedImports
ImportedDefaultBinding
ImportedDefaultBinding :
 ImportedBinding
NameSpaceImport
NameSpaceImport :
 `*` `as` ImportedBinding
NamedImports
NamedImports :
 `{` `}`
 `{` ImportsList `}`
 `{` ImportsList `,` `}`
FromClause
FromClause :
 `from` ModuleSpecifier
ImportsList
ImportsList :
 ImportSpecifier
 ImportsList `,` ImportSpecifier
ImportSpecifier
ImportSpecifier :
 ImportedBinding
 IdentifierName `as` ImportedBinding
ModuleSpecifier
ModuleSpecifier :
 StringLiteral
ImportedBinding
ImportedBinding :
 BindingIdentifier[~Yield, ~Await]
ExportDeclaration
ExportDeclaration :
 `export` `*` FromClause `;`
 `export` ExportClause FromClause `;`
 `export` ExportClause `;`
 `export` VariableStatement[~Yield, ~Await]
 `export` Declaration[~Yield, ~Await]
 `export` `default` HoistableDeclaration[~Yield, ~Await, +Default]
 `export` `default` ClassDeclaration[~Yield, ~Await, +Default]
 `export` `default` [lookahead <! {`function`, `async` [no |LineTerminator| here] `function`, `class`}] AssignmentExpression[+In, ~Yield, ~Await] `;`
ExportDeclaration :
 `export` `*` FromClause `;`
 `export` ExportClause FromClause `;`
 `export` ExportClause `;`
ExportDeclaration :
 `export` ExportClause FromClause `;`
 `export` `*` FromClause `;`
ExportDeclaration : `export` `default` HoistableDeclaration
ExportDeclaration : `export` ExportClause FromClause `;`
ExportDeclaration :
 `export` `*` FromClause `;`
 `export` ExportClause FromClause `;`
 `export` ExportClause `;`
 `export` `default` AssignmentExpression `;`
ExportDeclaration :
 `export` `*` FromClause `;`
 `export` ExportClause FromClause `;`
 `export` ExportClause `;`
 `export` VariableStatement
ExportDeclaration : `export` `*` FromClause `;`
ExportDeclaration :
 `export` ExportClause `;`
 `export` VariableStatement
 `export` Declaration
 `export` `default` HoistableDeclaration
 `export` `default` ClassDeclaration
 `export` `default` AssignmentExpression `;`
ExportClause
ExportClause :
 `{` `}`
 `{` ExportsList `}`
 `{` ExportsList `,` `}`
ExportsList
ExportsList :
 ExportSpecifier
 ExportsList `,` ExportSpecifier
ExportSpecifier
ExportSpecifier :
 IdentifierName
 IdentifierName `as` IdentifierName
StringNumericLiteral
StringNumericLiteral :::
StrWhiteSpace?
StrWhiteSpace? StrNumericLiteral StrWhiteSpace?
StrWhiteSpace
StrWhiteSpace :::
 StrWhiteSpaceChar StrWhiteSpace?
StrWhiteSpaceChar
StrWhiteSpaceChar :::
 WhiteSpace
 LineTerminator
StrNumericLiteral
StrNumericLiteral :::
 StrDecimalLiteral
 BinaryIntegerLiteral
 OctalIntegerLiteral
 HexIntegerLiteral
StrDecimalLiteral
StrDecimalLiteral :::
 StrUnsignedDecimalLiteral
 `+` StrUnsignedDecimalLiteral
 `-` StrUnsignedDecimalLiteral
StrUnsignedDecimalLiteral
StrUnsignedDecimalLiteral :::
 `Infinity`
 DecimalDigits `.` DecimalDigits? ExponentPart?
 `.` DecimalDigits ExponentPart?
 DecimalDigits ExponentPart?
DecimalDigits
DecimalDigits ::
 DecimalDigit
 DecimalDigits DecimalDigit
DecimalDigit
DecimalDigit :: one of
 `0` `1` `2` `3` `4` `5` `6` `7` `8` `9`
ExponentPart
ExponentPart ::
 ExponentIndicator SignedInteger
ExponentIndicator
ExponentIndicator :: one of
 `e` `E`
SignedInteger
SignedInteger ::
 DecimalDigits
 `+` DecimalDigits
 `-` DecimalDigits
HexIntegerLiteral
HexIntegerLiteral ::
 `0x` HexDigits
 `0X` HexDigits
HexDigit
HexDigit :: one of
 `0` `1` `2` `3` `4` `5` `6` `7` `8` `9` `a` `b` `c` `d` `e` `f` `A` `B` `C` `D` `E` `F`

All grammar symbols not explicitly defined by the |StringNumericLiteral| grammar have the definitions used in the Lexical Grammar for numeric literals.

uri
uri :::
uriCharacters?
uriCharacters
uriCharacters :::
 uriCharacter uriCharacters?
uriCharacter
uriCharacter :::
 uriReserved
 uriUnescaped
 uriEscaped
uriReserved
uriReserved ::: one of
 `;` `/` `?` `:` `@` `&` `=` `+` `$` `,`
uriUnescaped
uriUnescaped :::
 uriAlpha
 DecimalDigit
 uriMark
uriEscaped
uriEscaped :::
 `%` HexDigit HexDigit
uriAlpha
uriAlpha ::: one of
 `a` `b` `c` `d` `e` `f` `g` `h` `i` `j` `k` `l` `m` `n` `o` `p` `q` `r` `s` `t` `u` `v` `w` `x` `y` `z`
 `A` `B` `C` `D` `E` `F` `G` `H` `I` `J` `K` `L` `M` `N` `O` `P` `Q` `R` `S` `T` `U` `V` `W` `X` `Y` `Z`
uriMark
uriMark ::: one of
 `-` `_` `.` `!` `~` `*` `'` `(` `)`
Pattern
Pattern[U, N] ::
 Disjunction[?U, ?N]
Disjunction
Disjunction[U, N] ::
 Alternative[?U, ?N]
 Alternative[?U, ?N] `|` Disjunction[?U, ?N]
Alternative
Alternative[U, N] ::
 [empty]
 Alternative[?U, ?N] Term[?U, ?N]
Term
Term[U, N] ::
 Assertion[?U, ?N]
 Atom[?U, ?N]
 Atom[?U, ?N] Quantifier
Term[U, N] ::
 [+U] Assertion[+U, ?N]
 [+U] Atom[+U, ?N]
 [+U] Atom[+U, ?N] Quantifier
 [~U] QuantifiableAssertion[?N] Quantifier
 [~U] Assertion[~U, ?N]
 [~U] ExtendedAtom[?N] Quantifier
 [~U] ExtendedAtom[?N]
Assertion
Assertion[U, N] ::
 `^`
 `$`
 `\` `b`
 `\` `B`
 `(` `?` `=` Disjunction[?U, ?N] `)`
 `(` `?` `!` Disjunction[?U, ?N] `)`
 `(` `?` `<=` Disjunction[?U, ?N] `)`
 `(` `?` `<!` Disjunction[?U, ?N] `)`
Assertion[U, N] ::
 `^`
 `$`
 `\` `b`
 `\` `B`
 [+U] `(` `?` `=` Disjunction[+U, ?N] `)`
 [+U] `(` `?` `!` Disjunction[+U, ?N] `)`
 [~U] QuantifiableAssertion[?N]
Quantifier
Quantifier ::
 QuantifierPrefix
 QuantifierPrefix `?`
QuantifierPrefix
QuantifierPrefix ::
 `*`
 `+`
 `?`
 `{` DecimalDigits `}`
 `{` DecimalDigits `,` `}`
 `{` DecimalDigits `,` DecimalDigits `}`
Atom
Atom[U, N] ::
 PatternCharacter
 `.`
 `\` AtomEscape[?U, ?N]
 CharacterClass[?U]
 `(` GroupSpecifier[?U] Disjunction[?U, ?N] `)`
 `(` `?` `:` Disjunction[?U, ?N] `)`
SyntaxCharacter
SyntaxCharacter :: one of
 `^` `$` `\` `.` `*` `+` `?` `(` `)` `[` `]` `{` `}` `|`
PatternCharacter
PatternCharacter ::
 SourceCharacter but not SyntaxCharacter
AtomEscape
AtomEscape[U, N] ::
 DecimalEscape
 CharacterClassEscape[?U]
 CharacterEscape[?U]
 [+N] `k` GroupName[?U]
AtomEscape[U, N] ::
 [+U] DecimalEscape
 [~U] DecimalEscape [> but only if the CapturingGroupNumber of |DecimalEscape| is <= _NcapturingParens_]
 CharacterClassEscape[?U]
 CharacterEscape[~U, ?N]
 [+N] `k` GroupName[?U]
CharacterEscape
CharacterEscape[U] ::
 ControlEscape
 `c` ControlLetter
 `0` [lookahead <! DecimalDigit]
 HexEscapeSequence
 RegExpUnicodeEscapeSequence[?U]
 IdentityEscape[?U]
CharacterEscape ::
 ControlEscape
 `c` ControlLetter
 `0` [lookahead <! DecimalDigit]
 HexEscapeSequence
 RegExpUnicodeEscapeSequence
 IdentityEscape
CharacterEscape[U, N] ::
 ControlEscape
 `c` ControlLetter
 `0` [lookahead <! DecimalDigit]
 HexEscapeSequence
 RegExpUnicodeEscapeSequence[?U]
 [~U] LegacyOctalEscapeSequence
 IdentityEscape[?U, ?N]
ControlEscape
ControlEscape :: one of
 `f` `n` `r` `t` `v`
ControlLetter
ControlLetter :: one of
 `a` `b` `c` `d` `e` `f` `g` `h` `i` `j` `k` `l` `m` `n` `o` `p` `q` `r` `s` `t` `u` `v` `w` `x` `y` `z`
 `A` `B` `C` `D` `E` `F` `G` `H` `I` `J` `K` `L` `M` `N` `O` `P` `Q` `R` `S` `T` `U` `V` `W` `X` `Y` `Z`
RegExpUnicodeEscapeSequence
RegExpUnicodeEscapeSequence[U] ::
 [+U] `u` LeadSurrogate `\u` TrailSurrogate
 [+U] `u` LeadSurrogate
 [+U] `u` TrailSurrogate
 [+U] `u` NonSurrogate
 [~U] `u` Hex4Digits
 [+U] `u{` CodePoint `}`

Each `\\u` |TrailSurrogate| for which the choice of associated `u` |LeadSurrogate| is ambiguous shall be associated with the nearest possible `u` |LeadSurrogate| that would otherwise have no corresponding `\\u` |TrailSurrogate|.

LeadSurrogate
LeadSurrogate ::
 Hex4Digits [> but only if the SV of |Hex4Digits| is in the inclusive range 0xD800 to 0xDBFF]
LeadSurrogate :: Hex4Digits
TrailSurrogate
TrailSurrogate ::
 Hex4Digits [> but only if the SV of |Hex4Digits| is in the inclusive range 0xDC00 to 0xDFFF]
TrailSurrogate :: Hex4Digits
NonSurrogate
NonSurrogate ::
 Hex4Digits [> but only if the SV of |Hex4Digits| is not in the inclusive range 0xD800 to 0xDFFF]
NonSurrogate :: Hex4Digits
IdentityEscape
IdentityEscape[U] ::
 [+U] SyntaxCharacter
 [+U] `/`
 [~U] SourceCharacter but not UnicodeIDContinue
IdentityEscape[U, N] ::
 [+U] SyntaxCharacter
 [+U] `/`
 [~U] SourceCharacterIdentityEscape[?N]
DecimalEscape
DecimalEscape ::
 NonZeroDigit DecimalDigits? [lookahead <! DecimalDigit]
CharacterClassEscape
CharacterClassEscape[U] ::
 `d`
 `D`
 `s`
 `S`
 `w`
 `W`
 [+U] `p{` UnicodePropertyValueExpression `}`
 [+U] `P{` UnicodePropertyValueExpression `}`
CharacterClass
CharacterClass[U] ::
 `[` [lookahead <! {`^`}] ClassRanges[?U] `]`
 `[` `^` ClassRanges[?U] `]`
ClassRanges
ClassRanges[U] ::
 [empty]
 NonemptyClassRanges[?U]
NonemptyClassRanges
NonemptyClassRanges[U] ::
 ClassAtom[?U]
 ClassAtom[?U] NonemptyClassRangesNoDash[?U]
 ClassAtom[?U] `-` ClassAtom[?U] ClassRanges[?U]
NonemptyClassRangesNoDash
NonemptyClassRangesNoDash[U] ::
 ClassAtom[?U]
 ClassAtomNoDash[?U] NonemptyClassRangesNoDash[?U]
 ClassAtomNoDash[?U] `-` ClassAtom[?U] ClassRanges[?U]
ClassAtom
ClassAtom[U] ::
 `-`
 ClassAtomNoDash[?U]
ClassAtom :: `-`
ClassAtomNoDash
ClassAtomNoDash[U] ::
 SourceCharacter but not one of `\` or `]` or `-`
 `\` ClassEscape[?U]
ClassAtomNoDash :: SourceCharacter but not one of `\` or `]` or `-`
ClassAtomNoDash[U, N] ::
 SourceCharacter but not one of `\` or `]` or `-`
 `\` ClassEscape[?U, ?N]
 `\` [lookahead == `c`]
ClassAtomNoDash :: `\` [lookahead == `c`]
ClassEscape
ClassEscape[U] ::
 `d`
 `D`
 `s`
 `S`
 `w`
 `W`
 [+U] `p{` UnicodePropertyValueExpression `}`
 [+U] `P{` UnicodePropertyValueExpression `}`
ClassEscape :: `b`
ClassEscape :: `-`
ClassEscape :: CharacterClassEscape
ClassEscape[U, N] ::
 `b`
 [+U] `-`
 [~U] `c` ClassControlLetter
 CharacterClassEscape[?U]
 CharacterEscape[?U, ?N]