Introduction
In computer science, Backus-Naur Form or Backus normal form (BNF), introduced by John Bakus and Peter Naur in 1960, is a meta-language (a language that cannot describe another language) for context-free grammar.

BNF is a formal method used for describing the syntax of languages such as computer programming languages, instruction sets, document formats, and communication protocols.
Let's now explore more about the Backus-Naur form (BNF) and its usage.
Read about Instruction Format in Computer Architecture
Backus-Naur Form
BNF form is a sequence of characters representing metalinguistic variables enclosed in the angular brackets <>. The metalinguistic connectives are the marks "::=" and "|".
BNF Symbol Representation
The scripts used by the ATL(Active Template Library) Registrar use the following notations through BNF(Backus-Naur form) syntax.
Symbol/Convention |
Meaning |
::= |
Equivalent |
| |
OR ( indicates a choice) |
[X] |
Here, X is optional. |
X+ |
One or more Xs. |
Bold text |
A string literal. |
Italicized text |
Constructing the string literal. |
Registrar scripts use string literals, as seen in the table above. These values include text that needs to be included in your script. The string literals used in the ATL Registrar script are listed in the following table.
| String literal | Action |
| ForceRemove | It removes the next Key (if it already exists) and then re-creates it. |
| val | It specifies the <Key Name> a named value. |
| NoRemove | It does not remove the next Key during the unregister. |
| b | It specifies that the next value is binary (REG_BINARY). |
| d | It specifies that the next value is a DWORD (REG_DWORD). |
| m | It specifies that the next value is a multi-string (REG_MULTI_SZ). |
| s | It represents that the next value is a string (REG_SZ). |
| Delete | It deletes the next Key during register. |
Syntax
A BNF specification is a sequence of derivation rules written as-
<symbol> ::= __expression__
Where:
<symbol> Symbols that appear on the left side are non-terminals (variable) and are always enclosed between the angular brackets <>. Whereas the symbols that never appear on the left side are the terminals.
::= As discussed earlier, this convention denotes that the symbol on the left side must be replaced with the expression on the right side.
__expression__ It consists of one or more sequences of either terminal or non-terminal symbols.
Example 1
<registry expression> ::= <Add Key> | <Delete Key>
It specifies that registry expression is equivalent to Add Key or Delete Key.
Example 2
<Key Name> ::= '<AlphaNumeric>+'
It specifies that the Key Name is equivalent to one or more(+) AlphaNumeric values.
Example 3
<AlphaNumeric> ::= any character not NULL
It specifies that AlphaNumeric is equivalent(::=) to any non-NULL character.
Example 4
<Add Key> ::= [ForceRemove | NoRemove | val]<Key Name>
This syntax specifies that Add Key is equivalent to Key Name and that the string literals, ForceRemove, NoRemove, and val, have their own meaning as discussed earlier.




