A notation used to describe the syntax of programming languages. It provides a structure to define how symbols can be combined to form valid strings in a langauge. Developed for FORTRAN
Concepts
BNF Rules
- Terminals are simply written out.
while
- Non-terminals are enclosed in angle brackets:
<statement>
- Productions are in the form:
<nonterminal> ::= <sequence of terminals or nonterminals>
- We can use
|
to represent or