


















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



















2
4
5
7
for each a ∈ ( T ∪ ε )
FIRST( a ) ← { a }
for each A ∈ NT
FIRST( A ) ← Ø
while ( FIRST sets are still changing)
i ←
i ← i+
FIRST( A ) ←FIRST( A ) ∪ {ε}
8
8 | id
10
E → T E' E' → + T E' | ε T → F T' T' → (^) * F T' | ε F → ( E ) | id
11
E → T E' E' → + T E' | ε T → F T' T' → (^) * F T' | ε F → ( E ) | id
13
14
Definition:
FOLLOW(X) = { b | S → ∗
16
17
19
F → ( E ) | id
20
F → ( E ) | id