Next: Formal Definition: first(X), follow(X),
Up: No Title
- first(B) first(A).
- if B is nullable then x first(A).
- Naive method: compute first, follow and nullable
for right-hand side and from that for A.
- Does not work for recursion!
- Idea: Start with empty sets and add elements until
all conditions are satisfied.
- This is called a fixpoint algorithm (It runs until
there are no more changes, until the solution is fix).