[Solved] How can I find all language specific tokens/lexicons for javascript? [closed]


The complete lexical specification for ECMAScript (aka JavaScript) can be found in Section 11 (Lexical Grammar) of ECMA 262. (New versions of ECMA-262 are released roughly annually, but the URL in that link — correct as of ECMAScript 2020 — should continue to work, or be easy to fix. I didn’t transcribe the list of reserved words, semi-reserved words, operators and other punctuators, because those lists may well change in a future standard.)

However, precisely specifying which IdentifierNames have specific meaning is not simple. You need to carefully read subsection 11.6 (Names and Keywords), and it will probably still be a bit confusing. The difficulty is that each successive version of ECMAScript tries extraordinarily hard to stay compatible with previous versions, making it hard to introduce new keywords. So many significant symbols are not in the list of reserved words. Some, like await are only reserved in certain contexts; many others (such as let) are only reserved in strict mode; and a few (such as async) are always usable as identifiers, but can be used syntactically in some contexts where an identifier would be a syntax error. There are various lists of symbols in section 11.6.2, which you could combine or select from, depending on what your need is.

Operator symbols (other than word operators) are a bit more straightforward (although there are still some oddities, so reading the fine print is still necessary). See the various lists in section 11.7.

solved How can I find all language specific tokens/lexicons for javascript? [closed]