A context-free grammar that derives the same word by different derivation trees, or equivalently by different derivation sequences. A familiar programming language example is:
where S and C stand for statement and condition. This grammar is ambiguous since the following compound statement
has two interpretations, corresponding with two derivation trees, as shown in the diagram. See also inherently ambiguous language.