CPSC 425 Spring 2006 HW 4: Top Down Parsing
For each grammar below,
List the terminals.
List the nonterminals.
Compute the First set for each right hand side. That is, for
each production <A> -> alpha, compute First(alpha).
Compute the Follow set for each nonterminal.
Use the First and Follow sets to compute the Predict set for each
production. It's often easiest to use the production numbers here,
e.g., Predict(1) = ...
1) <S> ::= <A> <B> c
2) <A> ::= a
3) <A> ::= empty
4) <B> ::= b
5) <B> ::= empty