BackusNaur
Backus–Naur Form, commonly abbreviated as BNF, is a notation for describing the syntax of programming languages and other formal languages. It expresses a context-free grammar as a set of production rules, each replacing a nonterminal with a sequence of terminals and nonterminals. A typical rule is written as A ::= α, where A is a nonterminal and α is a string of symbols. Alternatives are separated by a vertical bar, as in A ::= B | C. Terminals are the literal symbols of the language; nonterminals denote syntactic categories.
The notation emerged in the 1960s to describe the syntax of programming languages such as ALGOL 60.
Example grammar in BNF can be shown as:
expression ::= term | expression "+" term
term ::= factor | term "*" factor
factor ::= number | "(" expression ")"
Extensions known as Extended Backus–Naur Form (EBNF) add convenient constructs for optional elements, repetitions, and groupings,