UGC-NET | UGC NET CS 2018 Dec – II | Question 76

Consider the following Grammar G :

S ➝ A | B
A➝ a | c
B➝ b | c 

Where {S, A, B} is the set of non-terminals, {a,b,c} is the set of terminals.
Which of the following statement(s) is/are correct ?

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

(A) Both S​1​ and S​2
(B) Only S​2
(C) Neither S​1​ nor S​2
(D) Only S​1


Answer: (C)

Explanation:

Quiz of this Question
Please comment below if you find anything wrong in the above post

My Personal Notes arrow_drop_up
Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.