Gate CS-2015-3 Question Paper With Solutions

Q. 37 Consider the following grammar G.

  S → F ⎪ H
  F → p ⎪ c
  H → d ⎪ c

Where S, F and H are non-terminal symbols, p, d and c are terminal symbols. Which of the following statement(s) is/are correct?

S1: LL(1) can parse all strings that are generated using grammar G.
S2: LR(1) can parse all strings that are generated using grammar G.

(A) Only S1

(B) Only S2

(C) Both S1 and S2

(D) Neither S1 nor S2

Answer: (D)

Explanation:

Gate CS-2015-3 Question Paper With Solutions

Learn More:   Gate EE-2013 Question Paper With Solutions

LEAVE A REPLY

Please enter your comment!
Please enter your name here