Predict(A ® x) for Gexpr3: Example 1/2
1: E  ® TE’
Empty(TE’) =  Æ because Empty(T) =  Æ
Predict(1) := First(TE’) = First(T) = {i, (}
Empty(E) :=  Æ
Empty(E’) := {e}
Empty(T) :=  Æ
Empty(T’) := {e}
Empty(F) :=  Æ
First(E) := {i, (}
First(E’) := {+}
First(T) := {i, (}
First(T’) := {*}
First(F) := {i, (}
Follow(E) := {$, )}
Follow(E’) := {$, )}
Follow(T) := {+, $, )}
Follow(T’) := {+, $, )}
Follow(F) := {*, +, $, )}
2: E’ ® +TE’
Empty(+TE’) =  Æ because Empty(T) =  Æ
Predict(2) := First(+TE’) = First(+) = {+}
3: E’ ® e
Empty(e) =  {e}
Predict(3) := First(e) È Follow(E’) = Æ È {$, )} = {$, )}
4: T  ® FT’
Empty(FT’) =  Æ because Empty(F) =  Æ
Predict(4) := First(FT’) = First(F) = {i, (}
36/57