GATE | GATE MOCK 2017 | Question 29

Consider the grammar G.

    E -> TE’
    E’ -> +TE’ | ԑ
    T’ -> FT’
    T’ -> *FT’ | ԑ
    F -> (E) | id

If LL(1) parsing table is constructed using the grammar G, then how many entries are present in the row that represents E’ nonterminal ? (consider the entries which are not error/not blank entries)
(A) 1
(B) 2
(C) 3
(D) 4

Answer: (C)

Explanation: First (E’) = {+ ,ԑ}
Follow (E’) = {$ , )}


Therefore 3 entries are present in E’ row

Quiz of this Question

My Personal Notes arrow_drop_up
Article Tags :

Be the First to upvote.

Please write to us at to report any issue with the above content.