A grammar is said to be in Greibach normal form (GNF) is it is E-free and each production (except S -+ e if it exists) is of the form A -+ ao., where a is a terminal and a is a string of nonterminals, possibly empty.
a) Write an algorithm to convert a grammar into an equivalent G reibach normal form grammar.
b) Apply your algorithm to the expression grammar (4.10).