Final answer:
To transform the given grammars into a form suitable for recursive-descent parsing, we need to remove left-recursion and apply left-factoring.
Step-by-step explanation:
Recursive-descent parsing is one of the simplest parsing techniques that is used in practice. Recursive-descent parsers are also called top-down parsers, since they construct the parse tree top down (rather than bottom up).
To transform the given grammars into a form suitable for recursive-descent parsing, we need to remove left-recursion and apply left-factoring.
Here are the transformations for each grammar:
(a) S ⟶ cbS' | daaS' | ε
S' ⟶ adS' | ε
(b) S ⟶ dS'b | bcaSa' | bcdS'' | caa
S' ⟶ cS'b | cdS'' | ε
S'' ⟶ aSa'' | ε
(c) S ⟶ bcS' | c
S' ⟶ aS' | ε
(d) S ⟶ dbS'' | cdaS' | cdb | cd
S' ⟶ bddS' | ε
S'' ⟶ cS'' | ε
(e) S ⟶ aSbSa' | ccbSa' | ε
S' ⟶ bS'' | cSa' | ε
S'' ⟶ cS'' | a
(f) S ⟶ B | ε
B ⟶ Ba' | a
a' ⟶ a'
(g) S ⟶ bS' | bcdS' | ε
S' ⟶ aS' | ε
(h) S ⟶ dbS' | dcS' | a | c
S' ⟶ bS' | cS' | ε