Similar questions 7 more →
Parsing & Syntax Analysis

Answer & solution
Answer: Non-error entries: E: −→1, (→2, id→3; T: −→4, )/$→5; V: id→6; U: (→7, −/)/$→8; G: −/(/id→9. (no official key was published)
FIRST(E)={−,(,id}, FIRST(T)={−,ε}, FIRST(V)={id}, FIRST(U)={(,ε}, and FIRST(G)={−,(,id}. E can be followed by a closing parenthesis in productions 2 and 7, or by $ in production 9. Its appearances at the ends of productions 1 and 4 add no new terminals. Hence FOLLOW(E)=FOLLOW(T)={),$}. From E→VT, FOLLOW(V)={−,),$}; U is at the end of V→idU, so FOLLOW(U)={−,),$}.
Place each nonnullable production under the terminals in its right-hand FIRST set. Place each ε-production under FOLLOW of its left-hand side. The complete table, listing columns in the order −, (, id, ), $, is:
E: [1,2,3,error,error]
T: [4,error,error,5,5]
V: [error,error,6,error,error]
U: [8,7,error,8,8]
G: [9,9,9,error,error].
No cell has two productions, establishing the LL(1) property. Parentheses and the minus token are literal terminals; λ in the source denotes ε, not an input token. If $ is treated as an explicit grammar terminal, a separate meta-end marker follows it, without changing these table choices.