next up previous
Next: Constructing an LL(1) grammar Up: How to implement a Previous: What is a LL(1)

How to calculate $ \textrm {First}$ and $ \textrm {Follow}$

We have to determine whether $ A\Rightarrow ^* \epsilon$. If there are no $ \epsilon$-production we now that the answer is always negative, otherwise

We calculate $ \textrm {First}$ and $ \textrm {Follow}$ in a similar fashion:

And for $ \textrm {Follow}$:



Thorsten Altenkirch 2001-05-08