Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.compilers > #2517

ECMAScript grammar notation

From Lasse Hillerøe Petersen <lhp+news@toft-hp.dk>
Newsgroups comp.compilers
Subject ECMAScript grammar notation
Date 2020-05-12 07:20 +0000
Organization SunSITE.dk - Supporting Open source
Message-ID <20-05-004@comp.compilers> (permalink)

Show all headers | View raw


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

Back to comp.compilers | Previous | Next | Find similar


Thread

ECMAScript grammar notation Lasse Hillerøe Petersen <lhp+news@toft-hp.dk> - 2020-05-12 07:20 +0000

csiph-web