The extended Backus–Naur form (EBNF) is an extension of the basic Backus–Naur form (BNF) metasyntax notation. Originally developed by Niklaus Wirth, the most commonly used variants of EBNF are currently defined by standards, most notably ISO-14977.
1. The following conventions are used:
As examples, the following syntax-rules illustrate the facilities for expressing repetition: aa = "A"; bb = 3 * aa, "B"; cc = 3 * *, "C"; dd = {aa}, "D"; ee = aa, {aa}, "E"; ff = 3 * aa, 3 * *, "F"; gg = {3 * aa}, "D"; Terminal-strings defined by these rules are as follows: aa: A bb: AAAB cc: C AC AAC AAAC dd: D AD AAD AAAD AAAAD etc. ee: AE AAE AAAE AAAAE AAAAAE etc. ff: AAAF AAAAF AAAAAF AAAAAAF gg: D AAAD AAAAAAD etc.
When Niklaus Wirth was developing Pascal, he simplified Backus–Naur Form to create EBNF.
All these constructs can be expressed in plain BNF using extra productions and have been added for readability and succinctness.
There is an International standard (ISO 14977) that defines an EBNF. This is now freely available electronically as a zipped pdf file from ISO.
The W3C used a different EBNF to specify the XML syntax.
The British Standards Institute published a standard for an EBNF: BS 6154 in 1981.
The IETF uses Augmented BNF (ABNF), specified in RFC 2234.
Publicly available (zipped) document: link ISO IEC 14977 E
This article is licensed under the GNU Free Documentation License.
It uses material from the
"Extended Backus–Naur form".
Home Page • arts • business • computers • games • health • hospitals • home • kids & teens • news • physicians • recreation• reference • regional • science • shopping • society • sports • world