What it is and the problem it solves
BNF is a notation for precisely specifying the syntactic structure of programming languages. It solves the problem of ambiguous, informal language definitions that hindered early compiler development and cross-compiler portability.
How it works
BNF is a metalanguage: it uses recursive syntactic rules to define the grammar of programming languages. Each rule has a left-hand non-terminal symbol and a right-hand expansion containing terminals (literal tokens) and other non-terminals.
What works
BNF enabled unambiguous, human-readable, and machine-parsable grammar definitions. Its use in the ALGOL 60 Report made syntax specification reproducible—and directly supported the first wave of portable, standards-compliant compilers.
What does not
BNF does not describe semantics, runtime behaviour, or ambiguity resolution. It cannot express constraints like ‘a variable must be declared before use’ or handle operator precedence without ad-hoc extensions.
What it changes
It established syntax as a separable, testable, and machine-processable layer of language design—shifting compiler construction from ad-hoc parsing to systematic derivation.
Is it worth your time
Yes—if you work with language definition, parser generation, or formal specification. BNF remains embedded in toolchains like yacc and ANTLR, but its notation is now often augmented or replaced by EBNF or context-free grammar variants.