Assignment Unit III
Assignment Unit III
Assignment Sheet-III
This assignment corresponds to Unit No. III and CO-3
1. Write the procedure and eliminate left recursion from the following Grammar.
a. E → E + T / T
b. T → T*F / F
c. F → (E)/id
2. Describe Chomsky hierarchy.
3. A context free grammar G is given by the following productions:
E→E+E|E-E|E∗E|E^E|N
N→0|1|2|3|4|5|6|7|8|9
Determine whether the grammar G is ambiguous or not. If ambiguous then construct
an unambiguous grammar equivalent to G.
4. Define Greibach normal form (GNF) for a CFG.
Convert the following CFG to its equivalent GNF:
S → AA | a, A → SS | b.
Signature of Faculty
Page 85 of 98