Next: Annexe 2.
Up: Final-13-04-2004
Previous: Exercise 10.
Recall that for any string of symbols the set FIRST()
satisfies the following conditions for every terminal a and every string of symbols
- FIRST()
VT {}
-
a
iff a FIRST()
-
iff
FIRST().
For a symbol
X VT VN the set FIRST(X) can be computed as follows
Algorithm 1
Algorithm 2
Recall that FOLLOW(A) is the set of the terminals that can appear
immediately to the right of the nonterminal A in some sentential form.
Moreover $ belongs to FOLLOW(A) if A is the rightmost
symbol in some sentential form.
Algorithm 3
Next: Annexe 2.
Up: Final-13-04-2004
Previous: Exercise 10.
Marc Moreno Maza
2004-12-02