Backus-naur Form Website Links For
Form
 

Information About

Backus-naur Form




BNF is widely used as a Notation for the Grammar s of computer Programming Language s, Instruction Set s and Communication Protocol s, as well as a notation for representing parts of Natural Language grammars (for example, ''meter'' In Sanskrit Poetry .) Many textbooks for programming language theory and/or semantics document the programming language in BNF.

There are many extensions of and variants on BNF.


HISTORY

John Backus created the notation in order to express the grammar of ALGOL . At the first World Computer Congress, which took place in Paris in 1959 , Backus presented "The syntax and semantics of the proposed international algebraic language of the Zurich ACM-GAMM Conference", a formal description of the IAL which was later called ALGOL 58 . The formal language he presented was based on Emil Post 's production system. Generative Grammars were an active subject of mathematical study, e.g. by Noam Chomsky , who was applying them to the grammar of natural language.Chomsky, Noam, "Three Models for the Description of Language," ''IRE Transactions on Information Theory'', Vol. 2 No. 2, pp. 113-123, 1956. Chomsky, Noam, ''Syntactic Structures'', Mouton, The Hague, 1957.

Peter Naur later simplified Backus's notation to minimize the character set used, and, at the suggestion of Donald Knuth Knuth, Donald E. "Backus Normal Form vs. Backus Naur Form," ''Communications of the ACM'' 7(12):735-736, 1964, his name was added in recognition of his contribution.

The Backus–Naur Form or BNF grammars have significant similarities to 's grammar rules, and the notation is sometimes also referred to as Panini–Backus Form.


INTRODUCTION

A BNF specification is a set of Derivation Rules , written as

::=

  <personal-part> :: <first-name> <initial> ""
  <syntax> :: <rule> <rule> <syntax>
  <opt-whitespace> :: " " <opt-whitespace> "" <!-- "" is empty string, ie no whitespace -->
  <expression> :: <list> <list> "" <expression>
  <line-end> :: <opt-whitespace> <EOL> <line-end> <line-end>
  <list> :: <term> <term> <opt-whitespace> <list>
  <term> :: <literal> "<" <rule-name> ">"
  <literal> :: '"' <text> '"' "'" <text> "'" <!-- actually, the original BNF didn't use quotes -->