Skip to content

Annex A (informative) Grammar Summary

A.1 Lexical Grammar

The following tokens are also considered to be FutureReservedWords when parsing strict mode code:

implements  package  protected
interface  private  public

 

A.2 Expressions

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

 

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

 

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

AssignmentPattern[Yield, Await] : ObjectAssignmentPattern[?Yield, ?Await] ArrayAssignmentPattern[?Yield, ?Await] ObjectAssignmentPattern[Yield, Await] : { } { AssignmentRestProperty[?Yield, ?Await] } { AssignmentPropertyList[?Yield, ?Await] } { AssignmentPropertyList[?Yield, ?Await] , AssignmentRestProperty[?Yield, ?Await]opt } ArrayAssignmentPattern[Yield, Await] : [ Elisionopt AssignmentRestElement[?Yield, ?Await]opt ] [ AssignmentElementList[?Yield, ?Await] ] [ AssignmentElementList[?Yield, ?Await] , Elisionopt AssignmentRestElement[?Yield, ?Await]opt ] AssignmentPropertyList[Yield, Await] : AssignmentProperty[?Yield, ?Await] AssignmentPropertyList[?Yield, ?Await] , AssignmentProperty[?Yield, ?Await] AssignmentElementList[Yield, Await] : AssignmentElisionElement[?Yield, ?Await] AssignmentElementList[?Yield, ?Await] , AssignmentElisionElement[?Yield, ?Await] AssignmentElisionElement[Yield, Await] : Elisionopt AssignmentElement[?Yield, ?Await] AssignmentProperty[Yield, Await] : IdentifierReference[?Yield, ?Await] Initializer[+In, ?Yield, ?Await]opt PropertyName[?Yield, ?Await] : AssignmentElement[?Yield, ?Await] AssignmentElement[Yield, Await] : DestructuringAssignmentTarget[?Yield, ?Await] Initializer[+In, ?Yield, ?Await]opt AssignmentRestElement[Yield, Await] : ... DestructuringAssignmentTarget[?Yield, ?Await] DestructuringAssignmentTarget[Yield, Await] : LeftHandSideExpression[?Yield, ?Await]

 

A.3 Statements

A.4 Functions and Classes

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

 

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

 

A.5 Scripts and Modules

A.6 Number Conversions

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

A.7 Universal Resource Identifier Character Classes

A.8 Regular Expressions

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.