Path: csiph.com!xmission!news.snarked.org!border2.nntp.dca1.giganews.com!nntp.giganews.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: Lasse =?iso-8859-1?q?Hiller=F8e?= Petersen Newsgroups: comp.compilers Subject: ECMAScript grammar notation Date: 12 May 2020 07:20:52 GMT Organization: SunSITE.dk - Supporting Open source Lines: 18 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <20-05-004@comp.compilers> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="39264"; mail-complaints-to="abuse@iecc.com" Keywords: parse, question, javascript Posted-Date: 12 May 2020 11:50:28 EDT X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Xref: csiph.com comp.compilers:2517 I just looked at https://tc39.es/ecma262/#sec-notational-conventions 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"? /Lasse