In
computer science
Computer science is the study of computation, information, and automation. Computer science spans Theoretical computer science, theoretical disciplines (such as algorithms, theory of computation, and information theory) to Applied science, ...
, Backus–Naur form (BNF, pronounced ), also known as Backus normal form, is a notation system for defining the
syntax
In linguistics, syntax ( ) is the study of how words and morphemes combine to form larger units such as phrases and sentences. Central concerns of syntax include word order, grammatical relations, hierarchical sentence structure (constituenc ...
of
programming languages
A programming language is a system of notation for writing computer programs.
Programming languages are described in terms of their syntax (form) and semantics (meaning), usually defined by a formal language. Languages usually provide features ...
and other
formal languages
In logic, mathematics, computer science, and linguistics, a formal language is a set of string (computer science), strings whose symbols are taken from a set called "#Definition, alphabet".
The alphabet of a formal language consists of symbol ...
, developed by
John Backus
John Warner Backus (December 3, 1924 – March 17, 2007) was an American computer scientist. He led the team that invented and implemented FORTRAN, the first widely used high-level programming language, and was the inventor of the Backus–N ...
and
Peter Naur
Peter Naur (25 October 1928 – 3 January 2016) was a Danish computer science pioneer and 2005 Turing Award winner. He is best remembered as a contributor, with John Backus, to the Backus–Naur form (BNF) notation used in describing the syntax ...
. It is a
metasyntax
A metasyntax is a syntax used to define the syntax of a programming language or formal language. It describes the allowable structure and composition of phrases and sentences of a metalanguage, which is used to describe either a natural langua ...
for
context-free grammars, providing a precise way to outline the rules of a language's structure.
It has been widely used in official specifications, manuals, and textbooks on
programming language theory
Programming language theory (PLT) is a branch of computer science that deals with the design, implementation, analysis, characterization, and classification of formal languages known as programming languages. Programming language theory is clos ...
, as well as to describe
document formats,
instruction sets, and
communication protocols. Over time, variations such as
extended Backus–Naur form
Extension, extend or extended may refer to:
Mathematics
Logic or set theory
* Axiom of extensionality
* Extensible cardinal
* Extension (model theory)
* Extension (proof theory)
* Extension (predicate logic), the set of tuples of values ...
(EBNF) and
augmented Backus–Naur form
In computer science, augmented Backus–Naur form (ABNF) is a metalanguage based on Backus–Naur form (BNF) but consisting of its own syntax and derivation rules. The motive principle for ABNF is to describe a formal system of a language to be use ...
(ABNF) have emerged, building on the original framework with added features.
Structure
BNF specifications outline how symbols are combined to form syntactically valid sequences. Each BNF consists of three core components: a set of
non-terminal symbols, a set of
terminal symbols, and a series of derivation rules.
Non-terminal symbols represent categories or variables that can be replaced, while terminal symbols are the fixed, literal elements (such as keywords or punctuation) that appear in the final sequence. Derivation rules provide the instructions for replacing non-terminal symbols with specific combinations of symbols.
A derivation rule is written in the format:
::= __expression__
where:
*
<symbol
A symbol is a mark, Sign (semiotics), sign, or word that indicates, signifies, or is understood as representing an idea, physical object, object, or wikt:relationship, relationship. Symbols allow people to go beyond what is known or seen by cr ...
>
is a non-terminal symbol, enclosed in angle brackets (<>), identifying the category to be replaced
* is a metasymbol meaning "is replaced by,"
*
__expression__
is the replacement, consisting of one or more sequences of symbols—either terminal symbols (e.g., literal text like "Sr." or ",") or non-terminal symbols (e.g., )—with options separated by a
vertical bar
The vertical bar, , is a glyph with various uses in mathematics, computing, and typography. It has many names, often related to particular meanings: Sheffer stroke (in logic), pipe, bar, or (literally, the word "or"), vbar, and others.
Usage
...
(, ) to indicate alternatives.
For example, in the rule , the entire line is the derivation rule, "Sr.", "Jr.", and "" (an empty string) are terminal symbols, and is a non-terminal symbol.
Generating a valid sequence involves starting with a designated start symbol and iteratively applying the derivation rules.
This process can extend sequences incrementally. To allow flexibility, some BNF definitions include an optional "delete" symbol (represented as an empty alternative, e.g., ), enabling the removal of certain elements while maintaining syntactic validity.
Example
A practical illustration of BNF is a specification for a simplified U.S.
postal address:
::=
::= ,
::= , "."
::=
::= ","
::= "Sr." , "Jr." , , ""
::= "Apt" , ""
This translates into English as:
* A postal address consists of a name-part, followed by a
street-address part, followed by a
zip-code part.
* A name-part consists of either: a personal-part followed by a
last name followed by an optional
suffix
In linguistics, a suffix is an affix which is placed after the stem of a word. Common examples are case endings, which indicate the grammatical case of nouns and adjectives, and verb endings, which form the conjugation of verbs. Suffixes can ca ...
(Jr. Sr., or dynastic number) and
end-of-line, or a personal part followed by a name part (this rule illustrates the use of
recursion
Recursion occurs when the definition of a concept or process depends on a simpler or previous version of itself. Recursion is used in a variety of disciplines ranging from linguistics to logic. The most common application of recursion is in m ...
in BNFs, covering the case of people who use multiple first and middle names and initials).
* A personal-part consists of either a
first name
First most commonly refers to:
* First, the ordinal form of the number 1
First or 1st may also refer to:
Acronyms
* Faint Images of the Radio Sky at Twenty-Centimeters, an astronomical survey carried out by the Very Large Array
* Far Infrared an ...
or an
initial
In a written or published work, an initial is a letter at the beginning of a word, a chapter (books), chapter, or a paragraph that is larger than the rest of the text. The word is ultimately derived from the Latin ''initiālis'', which means '' ...
followed by a dot.
* A street address consists of a house number, followed by a street name, followed by an optional
apartment
An apartment (American English, Canadian English), flat (British English, Indian English, South African English), tenement (Scots English), or unit (Australian English) is a self-contained housing unit (a type of residential real estate) that ...
specifier, followed by an end-of-line.
* A zip-part consists of a
town
A town is a type of a human settlement, generally larger than a village but smaller than a city.
The criteria for distinguishing a town vary globally, often depending on factors such as population size, economic character, administrative stat ...
-name, followed by a comma, followed by a
state code, followed by a ZIP-code followed by an end-of-line.
* An opt-suffix-part consists of a suffix, such as "Sr.", "Jr." or a
roman-numeral, or an empty string (i.e. nothing).
* An opt-apt-num consists of a prefix "Apt" followed by an apartment number, or an empty string (i.e. nothing).
Note that many things (such as the format of a first-name, apartment number, ZIP-code, and Roman numeral) are left unspecified here. If necessary, they may be described using additional BNF rules.
History
The concept of using
rewriting rules to describe language structure traces back to at least
Pāṇini
(; , ) was a Sanskrit grammarian, logician, philologist, and revered scholar in ancient India during the mid-1st millennium BCE, dated variously by most scholars between the 6th–5th and 4th century BCE.
The historical facts of his life ar ...
, an ancient Indian Sanskrit grammarian who lived sometime between the 6th and 4th centuries
BC. His notation for describing
Sanskrit
Sanskrit (; stem form ; nominal singular , ,) is a classical language belonging to the Indo-Aryan languages, Indo-Aryan branch of the Indo-European languages. It arose in northwest South Asia after its predecessor languages had Trans-cultural ...
word structure is equivalent in power to that of BNF and exhibits many similar properties.
In Western society, grammar was long regarded as a subject for teaching rather than scientific study; descriptions were informal and targeted at practical usage. This perspective shifted in the first half of the 20th century, when linguists such as
Leonard Bloomfield
Leonard Bloomfield (April 1, 1887 – April 18, 1949) was an American linguist who led the development of structural linguistics in the United States during the 1930s and the 1940s. He is considered to be the father of American distributionalis ...
and
Zellig Harris
Zellig Sabbettai Harris (; October 23, 1909 – May 22, 1992) was an influential American linguist, mathematical syntactician, and methodologist of science. Originally a Semiticist, he is best known for his work in structural linguistics and di ...
began attempts to formalize language description, including
phrase structure. Meanwhile, mathematicians explored related ideas through
string rewriting rules as
formal logical systems, such as
Axel Thue
Axel Thue (; 19 February 1863 – 7 March 1922) was a Norwegian mathematician, known for his original work in diophantine approximation and combinatorics.
Work
Thue published his first important paper in 1909.
He stated in 1914 the so-called w ...
in 1914,
Emil Post
Emil Leon Post (; February 11, 1897 – April 21, 1954) was an American mathematician and logician. He is best known for his work in the field that eventually became known as computability theory.
Life
Post was born in Augustów, Suwałki Govern ...
in the 1920s–40s, and
Alan Turing
Alan Mathison Turing (; 23 June 1912 – 7 June 1954) was an English mathematician, computer scientist, logician, cryptanalyst, philosopher and theoretical biologist. He was highly influential in the development of theoretical computer ...
in 1936.
Noam Chomsky
Avram Noam Chomsky (born December 7, 1928) is an American professor and public intellectual known for his work in linguistics, political activism, and social criticism. Sometimes called "the father of modern linguistics", Chomsky is also a ...
, teaching linguistics to students of
information theory
Information theory is the mathematical study of the quantification (science), quantification, Data storage, storage, and telecommunications, communication of information. The field was established and formalized by Claude Shannon in the 1940s, ...
at
MIT
The Massachusetts Institute of Technology (MIT) is a private research university in Cambridge, Massachusetts, United States. Established in 1861, MIT has played a significant role in the development of many areas of modern technology and sc ...
combined linguistics and mathematics, adapting Thue's formalism to describe natural language syntax. In 1956, he introduced a clear distinction between generative rules (those of
context-free grammars) and transformation rules.
BNF itself emerged when
John Backus
John Warner Backus (December 3, 1924 – March 17, 2007) was an American computer scientist. He led the team that invented and implemented FORTRAN, the first widely used high-level programming language, and was the inventor of the Backus–N ...
, a programming language designer at
IBM
International Business Machines Corporation (using the trademark IBM), nicknamed Big Blue, is an American Multinational corporation, multinational technology company headquartered in Armonk, New York, and present in over 175 countries. It is ...
, proposed a
metalanguage of ''metalinguistic formulas'' to define the syntax of the new programming language IAL, known today as
ALGOL 58, in 1959.
This notation was formalized in the
ALGOL 60
ALGOL 60 (short for ''Algorithmic Language 1960'') is a member of the ALGOL family of computer programming languages. It followed on from ALGOL 58 which had introduced code blocks and the begin and end pairs for delimiting them, representing a ...
report, where
Peter Naur
Peter Naur (25 October 1928 – 3 January 2016) was a Danish computer science pioneer and 2005 Turing Award winner. He is best remembered as a contributor, with John Backus, to the Backus–Naur form (BNF) notation used in describing the syntax ...
named it ''Backus normal form'' in the committee's 1963 report.
[Revised ALGOL 60 report section 1.1. ] Whether Backus was directly influenced by Chomsky's work is uncertain.
Donald Knuth
Donald Ervin Knuth ( ; born January 10, 1938) is an American computer scientist and mathematician. He is a professor emeritus at Stanford University. He is the 1974 recipient of the ACM Turing Award, informally considered the Nobel Prize of comp ...
argued in 1964 that BNF should be read as ''Backus–Naur form'', as it is "not a
normal form in the conventional sense," unlike
Chomsky normal form. In 1967, Peter Zilahy Ingerman suggested renaming it ''Pāṇini Backus form'' to acknowledge Pāṇini's earlier, independent development of a similar notation.
In the ALGOL 60 report, Naur described BNF as a ''metalinguistic formula'':
[Revised ALGOL 60 report section. 1.1.]
This is exemplified in the report's section 2.3, where comments are specified:
For the purpose of including text among the symbols of a program the following "comment" conventions hold:
Equivalence here means that any of the three structures shown in the left column may be replaced, in any occurrence outside of strings, by the symbol shown in the same line in the right column without any effect on the action of the program.
Naur altered Backus's original symbols for ALGOL 60, changing
:≡
to
::=
and the overbarred "" to
,
, using commonly available characters.
[
]
BNF is very similar to
canonical-form Boolean algebra
In mathematics and mathematical logic, Boolean algebra is a branch of algebra. It differs from elementary algebra in two ways. First, the values of the variable (mathematics), variables are the truth values ''true'' and ''false'', usually denot ...
equations (used in logic-circuit design), reflecting Backus's mathematical background as a FORTRAN designer.
Studies of Boolean algebra were commonly part of a mathematics curriculum, which may have informed Backus's approach. Neither Backus nor Naur described the names enclosed in
< >
as non-terminals—Chomsky's terminology was not originally used in describing BNF. Naur later called them "classes" in 1961 course materials.
In the ALGOL 60 report, they were "metalinguistic variables," with other symbols defining the target language.
Saul Rosen
Saul Rosen (February 8, 1922 – June 9, 1991) was an American computer science pioneer.
He is known for designing the software of the first transistor-based computer ''Philco Transac S-2000'', and for his work on programming language desig ...
, involved with the
Association for Computing Machinery
The Association for Computing Machinery (ACM) is a US-based international learned society for computing. It was founded in 1947 and is the world's largest scientific and educational computing society. The ACM is a non-profit professional membe ...
since 1947, contributed to the transition from IAL to ALGOL and edited Communications of the ACM. He described BNF as a metalanguage for ALGOL in his 1967 book. Early ALGOL manuals from IBM, Honeywell, Burroughs, and Digital Equipment Corporation followed this usage.
Impact
BNF significantly influenced programming language development, notably as the basis for early
compiler-compiler
In computer science, a compiler-compiler or compiler generator is a programming tool that creates a Parsing#Computer_languages, parser, interpreter (computer software), interpreter, or compiler from some form of formal description of a programm ...
systems. Examples include Edgar T. Irons' "A Syntax Directed Compiler for ALGOL 60" and Brooker and Morris' "A Compiler Building System," which directly utilized BNF. Others, like Schorre's
META II
META II is a Domain-specific language, domain-specific programming language for writing compilers. It was created in 1963–1964 by Dewey Val Schorre at University of California, Los Angeles (UCLA). META II uses what Schorre called ''Syntax (progr ...
, adapted BNF into a programming language, replacing
< >
with quoted strings and adding operators like $ for repetition, as in:
EXPR = TERM $('+' TERM .OUT('ADD') , '-' TERM .OUT('SUB')); This influenced tools like
yacc
Yacc (Yet Another Compiler-Compiler) is a computer program for the Unix operating system developed by Stephen C. Johnson. It is a lookahead left-to-right rightmost derivation (LALR) parser generator, generating a LALR parser (the part of a co ...
, a widely used
parser generator
In computer science, a compiler-compiler or compiler generator is a programming tool that creates a parser, interpreter, or compiler from some form of formal description of a programming language and machine.
The most common type of compiler- ...
rooted in BNF principles, and Unix utilities like
yacc
Yacc (Yet Another Compiler-Compiler) is a computer program for the Unix operating system developed by Stephen C. Johnson. It is a lookahead left-to-right rightmost derivation (LALR) parser generator, generating a LALR parser (the part of a co ...
. BNF remains one of the oldest computer-related notations still referenced today, though its variants often dominate modern applications.
Examples of its use as a metalanguage include defining arithmetic expressions:
::= , Here, can recursively include itself, allowing repeated additions.
BNF today is one of the oldest computer-related languages still in use.
BNF representation of itself

BNF's syntax itself may be represented with a BNF like the following:
::= ,
::= "<" ">" "::="
::= " " , ""
::= , ", "
::= ,
::= ,
::= , "<" ">"
::= '"' '"' , "'" "'"
::= "" ,
::= "" ,
::= , ,
::= "A" , "B" , "C" , "D" , "E" , "F" , "G" , "H" , "I" , "J" , "K" , "L" , "M" , "N" , "O" , "P" , "Q" , "R" , "S" , "T" , "U" , "V" , "W" , "X" , "Y" , "Z" , "a" , "b" , "c" , "d" , "e" , "f" , "g" , "h" , "i" , "j" , "k" , "l" , "m" , "n" , "o" , "p" , "q" , "r" , "s" , "t" , "u" , "v" , "w" , "x" , "y" , "z"
::= "0" , "1" , "2" , "3" , "4" , "5" , "6" , "7" , "8" , "9"
::= ", " , " " , "!" , "#" , "$" , "%" , "&" , "(" , ")" , "*" , "+" , "," , "-" , "." , "/" , ":" , ";" , ">" , "=" , "<" , "?" , "@" , " "\" , " , "^" , "_" , "`" , "" , "~"
::= , "'"
::= , '"'
::= ,
::= , , "-"
Note that "" is the
empty string
In formal language theory, the empty string, or empty word, is the unique String (computer science), string of length zero.
Formal theory
Formally, a string is a finite, ordered sequence of character (symbol), characters such as letters, digits ...
.
The original BNF did not use quotes as shown in
<literal>
rule. This assumes that no
whitespace
White space or whitespace may refer to:
Technology
* Whitespace characters, characters in computing that represent horizontal or vertical space
* White spaces (radio), allocated but locally unused radio frequencies
* TV White Space Database, a m ...
is necessary for proper interpretation of the rule.
<EOL>
represents the appropriate
line-end specifier (in
ASCII
ASCII ( ), an acronym for American Standard Code for Information Interchange, is a character encoding standard for representing a particular set of 95 (English language focused) printable character, printable and 33 control character, control c ...
, carriage-return, line-feed or both depending on the
operating system
An operating system (OS) is system software that manages computer hardware and software resources, and provides common daemon (computing), services for computer programs.
Time-sharing operating systems scheduler (computing), schedule tasks for ...
).
<rule-name>
and
<text>
are to be substituted with a declared rule's name/label or literal text, respectively.
In the U.S. postal address example above, the entire block-quote is a
<syntax>
. Each line or unbroken grouping of lines is a rule; for example one rule begins with
<name-part> ::=
. The other part of that rule (aside from a line-end) is an expression, which consists of two lists separated by a vertical bar
,
. These two lists consists of some terms (three terms and two terms, respectively). Each term in this particular rule is a rule-name.
Variants
EBNF
There are many variants and extensions of BNF, generally either for the sake of simplicity and succinctness, or to adapt it to a specific application. One common feature of many variants is the use of
regular expression
A regular expression (shortened as regex or regexp), sometimes referred to as rational expression, is a sequence of characters that specifies a match pattern in text. Usually such patterns are used by string-searching algorithms for "find" ...
repetition operators such as
*
and
+
. The
extended Backus–Naur form
Extension, extend or extended may refer to:
Mathematics
Logic or set theory
* Axiom of extensionality
* Extensible cardinal
* Extension (model theory)
* Extension (proof theory)
* Extension (predicate logic), the set of tuples of values ...
(EBNF) is a common one.
Another common extension is the use of square brackets around optional items. Although not present in the original ALGOL 60 report (instead introduced a few years later in
IBM
International Business Machines Corporation (using the trademark IBM), nicknamed Big Blue, is an American Multinational corporation, multinational technology company headquartered in Armonk, New York, and present in over 175 countries. It is ...
's
PL/I
PL/I (Programming Language One, pronounced and sometimes written PL/1) is a procedural, imperative computer programming language initially developed by IBM. It is designed for scientific, engineering, business and system programming. It has b ...
definition), the notation is now universally recognised.
ABNF
Augmented Backus–Naur form
In computer science, augmented Backus–Naur form (ABNF) is a metalanguage based on Backus–Naur form (BNF) but consisting of its own syntax and derivation rules. The motive principle for ABNF is to describe a formal system of a language to be use ...
(ABNF) and Routing Backus–Naur form (RBNF) are extensions commonly used to describe
Internet Engineering Task Force
The Internet Engineering Task Force (IETF) is a standards organization for the Internet standard, Internet and is responsible for the technical standards that make up the Internet protocol suite (TCP/IP). It has no formal membership roster ...
(IETF)
protocols.
Parsing expression grammar
In computer science, a parsing expression grammar (PEG) is a type of analytic formal grammar, i.e. it describes a formal language in terms of a set of rules for recognizing strings in the language. The formalism was introduced by Bryan Ford in 20 ...
s build on the BNF and
regular expression
A regular expression (shortened as regex or regexp), sometimes referred to as rational expression, is a sequence of characters that specifies a match pattern in text. Usually such patterns are used by string-searching algorithms for "find" ...
notations to form an alternative class of
formal grammar
A formal grammar is a set of Terminal and nonterminal symbols, symbols and the Production (computer science), production rules for rewriting some of them into every possible string of a formal language over an Alphabet (formal languages), alphabe ...
, which is essentially
analytic rather than
generative in character.
Others
Many BNF specifications found online today are intended to be human-readable and are non-formal. These often include many of the following syntax rules and extensions:
* Optional items enclosed in square brackets:
lt;item-x>/code>.
* Items existing 0 or more times are enclosed in curly brackets or suffixed with an asterisk (*
) such as <word> ::= <letter>
or <word> ::= <letter> <letter>*
respectively.
* Items existing 1 or more times are suffixed with an addition (plus) symbol, +
, such as <word> ::= <letter>+
.
* Terminals may appear in bold rather than italics, and non-terminals in plain text rather than angle brackets.
* Where items are grouped, they are enclosed in simple parentheses.
Software using BNF or variants
Software that accepts BNF (or a superset) as input
* ANTLR, a parser generator written in Java
Java is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea (a part of Pacific Ocean) to the north. With a population of 156.9 million people (including Madura) in mid 2024, proje ...
* Coco/R, compiler generator accepting an attributed grammar in EBNF
* DMS Software Reengineering Toolkit, program analysis and transformation system for arbitrary languages
* GOLD
Gold is a chemical element; it has chemical symbol Au (from Latin ) and atomic number 79. In its pure form, it is a brightness, bright, slightly orange-yellow, dense, soft, malleable, and ductile metal. Chemically, gold is a transition metal ...
, a BNF parser generator
* RPA BNF parser. Online (PHP) demo parsing: JavaScript, XML
* XACT X4MR System, a rule-based expert system for programming language translation
* XPL Analyzer, a tool which accepts simplified BNF for a language and produces a parser for that language in XPL; it may be integrated into the supplied SKELETON program, with which the language may be debugged (a SHARE contributed program, which was preceded by ''A Compiler Generator'')
* bnfparser2, a universal syntax verification utility
* bnf2xml, Markup input with XML tags using advanced BNF matching
* JavaCC, Java Compiler Compiler tm (JavaCC tm) - The Java Parser Generator
Similar software
* GNU bison, GNU version of yacc
*Yacc
Yacc (Yet Another Compiler-Compiler) is a computer program for the Unix operating system developed by Stephen C. Johnson. It is a lookahead left-to-right rightmost derivation (LALR) parser generator, generating a LALR parser (the part of a co ...
, parser generator (most commonly used with the Lex preprocessor)
* Racket's parser tools, lex and yacc-style parsing (Beautiful Racket edition)
* Qlik Sense, a BI tool, uses a variant of BNF for scripting
* BNF Converter (BNFC), operating on a variant called "labeled Backus–Naur form" (LBNF). In this variant, each production for a given non-terminal is given a label, which can be used as a constructor of an algebraic data type
In computer programming, especially functional programming and type theory, an algebraic data type (ADT) is a kind of composite data type, i.e., a data type formed by combining other types.
Two common classes of algebraic types are product ty ...
representing that nonterminal. The converter is capable of producing types and parsers for abstract syntax
In computer science, the abstract syntax of data is its structure described as a data type (possibly, but not necessarily, an abstract data type), independent of any particular representation or encoding. This is particularly used in the represent ...
in several languages, including Haskell
Haskell () is a general-purpose, statically typed, purely functional programming language with type inference and lazy evaluation. Designed for teaching, research, and industrial applications, Haskell pioneered several programming language ...
and Java
See also
* Augmented Backus–Naur form
In computer science, augmented Backus–Naur form (ABNF) is a metalanguage based on Backus–Naur form (BNF) but consisting of its own syntax and derivation rules. The motive principle for ABNF is to describe a formal system of a language to be use ...
(ABNF)
* Compiler Description Language (CDL)
* Definite clause grammar – a more expressive alternative to BNF used in Prolog
* Extended Backus–Naur form
Extension, extend or extended may refer to:
Mathematics
Logic or set theory
* Axiom of extensionality
* Extensible cardinal
* Extension (model theory)
* Extension (proof theory)
* Extension (predicate logic), the set of tuples of values ...
(EBNF)
* Meta-II – an early compiler writing tool and notation
* Syntax diagram
Syntax diagrams (or railroad diagrams) are a way to represent a context-free grammar. They represent a graphical alternative to Backus–Naur form, EBNF, Augmented Backus–Naur form, and other text-based grammars as metalanguages. Early books ...
– railroad diagram
* Translational Backus–Naur form
Translational Backus–Naur Form (TBNF or Translational BNF) refers to Backus–Naur form, which is a formal grammar notation used to define the syntax of computer languages, such as Algol, Ada (programming language), Ada, C++, COBOL, Fortran, Java ...
(TBNF)
* Van Wijngaarden grammar – used in preference to BNF to define Algol68
* Wirth syntax notation – an alternative to BNF from 1977
References
External links
* .
* — Augmented BNF for Syntax Specifications: ABNF.
* — Routing BNF: A Syntax Used in Various Protocol Specifications.
* ISO/IEC 14977:1996(E) ''Information technology – Syntactic metalanguage – Extended BNF'', available from or from (the latter is missing the cover page, but is otherwise much cleaner)
Language grammars
* , the original BNF.
* , freely available BNF grammars for SQL
Structured Query Language (SQL) (pronounced ''S-Q-L''; or alternatively as "sequel")
is a domain-specific language used to manage data, especially in a relational database management system (RDBMS). It is particularly useful in handling s ...
.
* , freely available BNF grammars for SQL, Ada, Java
Java is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea (a part of Pacific Ocean) to the north. With a population of 156.9 million people (including Madura) in mid 2024, proje ...
.
* , freely available BNF/ EBNF grammars for C/C++, Pascal, COBOL
COBOL (; an acronym for "common business-oriented language") is a compiled English-like computer programming language designed for business use. It is an imperative, procedural, and, since 2002, object-oriented language. COBOL is primarily ...
, Ada 95, PL/I
PL/I (Programming Language One, pronounced and sometimes written PL/1) is a procedural, imperative computer programming language initially developed by IBM. It is designed for scientific, engineering, business and system programming. It has b ...
.
* . Includes parts 11, 14, and 21 of the ISO 10303
ISO 10303 (Automation systems and integration — Product data representation and exchange)ISO 10303-1:1994 Industrial automation systems and integration -- Product data representation and exchange -- Part 1: Overview and fundamental principle ...
(STEP) standard.
{{DEFAULTSORT:Backus-Naur Form
Formal languages
Compiler construction
Metalanguages