Tag

Static Semantics

0 views collected around this technical thread.

ByteFE
ByteFE
Apr 25, 2021 · Fundamentals

Understanding ECMAScript Grammar: Lexical, Syntactic, and Identifier Rules

This article examines the four ECMAScript grammars—lexical, syntactic, regular‑expression, and numeric‑string—explains how context‑free productions define tokens, shows ambiguous cases such as the '/' and '`' characters, and details why the identifier await is prohibited in async functions through static‑semantic rules.

ECMAScriptLexicalStatic Semantics
0 likes · 13 min read
Understanding ECMAScript Grammar: Lexical, Syntactic, and Identifier Rules
ByteFE
ByteFE
Apr 22, 2021 · Frontend Development

Understanding ECMAScript Grammars: Lexical and Syntactic Rules and the Disallowance of await as an Identifier

This article explains how the ECMAScript specification defines four context‑free grammars—lexical, syntactic, RegExp, and numeric string—illustrates ambiguities such as the '/' token and template literals, and shows how static semantics forbid using the await keyword as an identifier inside async functions while allowing it elsewhere.

ECMAScriptLexicalStatic Semantics
0 likes · 15 min read
Understanding ECMAScript Grammars: Lexical and Syntactic Rules and the Disallowance of await as an Identifier