Penguin
Note: You are viewing an old revision of this page. View the current version.

Acronym for Backus Naur Form.

This is a way of specifying the syntax of a "langauge". Example

<sentance> ::= <verb-part> <noun-part>

<verb-part> ::= <noun-part> <verb>

<noun-part> ::= <proper-noun>

| THE <noun>

<verb> ::= throws

| kicks | hides | fetches

<proper-noun> ::= John

| Jane

<noun> ::= ball

::= dog

This would accept sentances such as

John kicks the dog Jane throws the ball The dog fetches the ball

There are usually several extensions to BNF which are often used, often called "EBNF". EBNF has "..." for "1 or more" and "[?" for optional