next up previous
Next: Algorithm for first(X), follow(X) Up: No Title Previous: How to compute first(X)

Formal Definition: first(X), follow(X), nullable

first(X), follow(X) and nullable are the smallest sets with the following properties:
\begin{program}
For~each~production~X~=~Y1~..~Yk,~$1 \le i$,~~$j \le k$:
\\ ~~~~...
 ...ullable
\\ ~~~~~~~~~~~~~~~~follow(Yi)~=~follow(Yi)~$\cup$~first(Yj)\end{program}



Christoph Zenger
4/6/2000