Work

Backus-Naur Form (BNF)

notation · 1959

Programming Languages Compilers Formal Languages

Backus-Naur Form (BNF) is a formal notation for describing the syntax of programming languages. Developed by John Backus and refined by Peter Naur in 1959-1960 for the ALGOL 60 specification, BNF provided the first rigorous way to define what constitutes a valid program in a language.

Origins

When the international committee designing ALGOL 60 needed to specify the language precisely, Backus introduced a notation he had developed while working on FORTRAN. Peter Naur refined it for the ALGOL 60 report, and the notation became known as Backus-Naur Form (originally “Backus Normal Form”)[1].

The Notation

BNF uses a simple but powerful formalism:

<expression> ::= <term> | <expression> "+" <term>
<term> ::= <factor> | <term> "*" <factor>
<factor> ::= <number> | "(" <expression> ")"

This example defines arithmetic expressions with proper operator precedence. The notation uses:

Impact

BNF transformed programming language design:

Extensions and Legacy

BNF spawned many variants:

Every modern programming language specification uses some form of BNF notation. It remains the standard way to formally define language syntax.


Sources

  1. Wikipedia. “Backus–Naur form.” History and technical details of BNF notation.