
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

b. S → TW T → Uc
d. Rewrite the language as ambnanam, which makes it easier to see how the grammar can be written.
e. Rewrite the language as an−mambman−m, which makes it easier to see how the gram- mar can be written.
To show the grammar is ambiguous show two leftmost derivations, or two rightmost derivations, or two parse trees, for a string such as abab. Here are two leftmost derivations: S =⇒ T =⇒ UU =⇒ abU =⇒ abab S =⇒ V =⇒ aWb =⇒ abab You can construct the corresponding parse trees.