Homework 2 (Spring 2003)
Due: March 5, 2003
Do exercise 3.7, parts h and i only, from page 147.
Eliminate left recursion from the following grammar:
A -> B | c B -> Ad | e
For the grammar
S -> (S)S | epsilon
Construct the FIRST and FOLLOW sets.
Construct the predictive parsing table.
Show (in the style of Figure 4.16, p. 188) the actions of the predictive parser on input
Is the following grammar LL(1)? Justify your answer.
S -> aSbS | bSaS | epsilon
Course web site: