A context-free grammar is in Chomsky normal form when every production is of one of the forms
where are nonterminal symbols and is a terminal symbol. The conventional exceptional production may be allowed when the language contains the empty word, with excluded from right-hand sides.
Take the productions
and the word . There is only one parse tree: its root uses and each child uses . There are nevertheless exactly two derivations,
and
according as the left or right occurrence of is replaced first. This illustrates that derivations record replacement order while a context-free grammar parse tree does not.
Production rule 2026-09-29
A production rule specifies a permitted replacement during a grammar derivation. In a context-free grammar it has the form , with one nonterminal on the left.