ECMAScript grammar notation

Lasse =?iso-8859-1?q?Hiller=F8e?= Petersen <>
12 May 2020 07:20:52 GMT

          From comp.compilers

Related articles
ECMAScript grammar notation (Lasse =?iso-8859-1?q?Hiller=F8e?= Petersen) (2020-05-12)
| List of all articles for this month |

From: Lasse =?iso-8859-1?q?Hiller=F8e?= Petersen <>
Newsgroups: comp.compilers
Date: 12 May 2020 07:20:52 GMT
Organization: - Supporting Open source
Injection-Info:; posting-host=""; logging-data="39264"; mail-complaints-to=""
Keywords: parse, question, javascript
Posted-Date: 12 May 2020 11:50:28 EDT

I just looked at and
noticed that they have been using an extended grammar notation (based on
the one used by K&R in The C Programming Language) for some years now.

It's not quite a VW-grammar yet, but I presume they introduced it because
the language now has so many weird corners, where a general version of a
production cannot be used without causing problems.

Productions can be parametrized with [Word1,Word2,...], such that a rule
Nonterminal[Alfa,Beta] is defines three rules, for Nonterminal,
Nonterminal_Alfa and Nonterminal_Beta. RHS Nonterminals can be
parametrized in various ways as well. NT[+Alfa], NT[~Alfa], NT[?Alfa]
with various meanings.

Are there any parser generators out there that support these "features"?


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.