Chapter 5. CONTEXT-free LANGUAGES

5.1 CONTEXT-FREE GRAMMARS

image.png

image.png

5.2 PARSING AND AMBIGUITY

A context-free grammar G is said to be ambiguous if there exists some w ∈ L (G) that has at least two distinct derivation trees. Alternatively, ambiguity implies the existence of two or more leftmost or rightmost derivations.

5.3 CONTEXT-FREE GRAMMARS AND PROGRAMMING

LANGUAGES

image.png

image.png

image.png