Show Summary Details

Quick Reference

Abbrev. for Backus normal form, Backus-Naur form. The first widely used formal notation for describing the syntax of a programming language; it was invented by John Backus. BNF was introduced as a defining mechanism in the Algol 60 Report (editor Peter Naur) to describe the syntax of Algol 60. BNF is capable of describing any context-free language, and variants of it are still in use today.

A BNF grammar consists of a number of production rules, which define syntactic categories in terms of other syntactic categories, and of the terminal symbols of the language. Examples are shown in the diagram. The name of the syntactic category that is being defined is placed on the left, its definition on the right; the two are separated by the symbol ::=, read as “is defined to be”. The names of syntactic categories are enclosed by angle brackets. The symbol | is read as “or”.

See also extended BNF.

BNF. Production rules of a BNF grammar

Subjects: Computing.

Reference entries

Users without a subscription are not able to see the full content. Please, subscribe or login to access all content.