?u/p1-90`| Cover grammar nonterminal | Abbreviation | Relevant sections |
|---|---|---|
The syntactic grammar for ECMAScript is given in clauses
When a stream of code points is to be parsed as an ECMAScript
When a parse is successful, it constructs a parse tree, a rooted tree structure in which each node is a Parse Node. Each Parse Node is an instance of a symbol in the grammar; it represents a span of the source text that can be derived from that symbol. The root node of the parse tree, representing the whole of the source text, is an instance of the parse's goal symbol. When a Parse Node is an instance of a nonterminal, it is also an instance of some production that has that nonterminal as its left-hand side. Moreover, it has zero or more children, one for each symbol on the production's right-hand side: each child is a Parse Node that is an instance of the corresponding symbol.
New Parse Nodes are instantiated for each invocation of the parser and never reused between parses even of identical source text. Parse Nodes are considered the same Parse Node if and only if they represent the same span of source text, are instances of the same grammar symbol, and resulted from the same parser invocation.
Productions of the syntactic grammar are distinguished by having just one colon “:” as punctuation.
The syntactic grammar as presented in clauses
In certain cases, in order to avoid ambiguities, the syntactic grammar uses generalized productions that permit token sequences that do not form a valid ECMAScript
A description of the "grammar assumptions" would be here.
When processing an instance of the production
the interpretation of
See the next section for the significance of
Elsewhere in this specification, there are early error rules that, under certain circumstances, require that a
Specifically, in a context where an actual
For example, consider:
let o = {f = 1};
{f = 1} is parsed as an
In contrast, consider:
({f = 1} = {f: 2});
Here, {f = 1} is again initially parsed as an {f = 1} is reparsed as an
When processing an instance of the production
the interpretation of
When processing an instance of the production
the interpretation of
delete Operator
It is a Syntax Error if the derived
and
| Common prefix sample | Conflicting alternative rules for |
|
|---|---|---|
{ .... } |
= |
|
[ .... ] |
= |
|
x, obj.x, obj[a] |
= |
|
x, obj.x, obj[a] |
||
x, obj.x, obj[a] |
&&= |
|
x, obj.x, obj[a] |
||= |
|
x, obj.x, obj[a] |
??= |
|
x, ( .... ) |
||
async x, async ( .... ) |
||
In certain circumstances when processing an instance of the production
the interpretation of
When processing an instance of the production
the interpretation of
for-in, for-of, and for-await-of Statements
When processing an instance of the production
the interpretation of
When processing an instance of the production
the interpretation of
© 2026 Mikhail Barash
All Software contained in this document ("Software") is protected by copyright and is being made available under the "BSD License", included below. This Software may be subject to third party rights (rights from parties other than Ecma International), including patent rights, and no licenses under such third party rights are granted under this license even if the third party concerned is a member of Ecma International. SEE THE ECMA CODE OF CONDUCT IN PATENT MATTERS AVAILABLE AT https://ecma-international.org/memento/codeofconduct.htm FOR INFORMATION REGARDING THE LICENSING OF PATENT CLAIMS THAT ARE REQUIRED TO IMPLEMENT ECMA INTERNATIONAL STANDARDS.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE ECMA INTERNATIONAL "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ECMA INTERNATIONAL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.