Open In App

ISRO | ISRO CS 2015 | Question 26

Which grammar rules violate the requirement of the operator grammar? A, B, C are variables and a, b, c are terminals

1) A → BC
2) A → CcBb
3) A → BaC
4) A → ε

(A) 1 only
(B) 1 and 2 only
(C) 1 and 3 only
(D) 1 and 4 only

Answer: (D)
Explanation: In operator grammar production rules which have two adjacent non-terminals on right hand side are not allowed. Additionally empty production rules are also not allowed. So, A → BC and A → ε are not allowed.
Correct option is (D).
Quiz of this Question
Please comment below if you find anything wrong in the above post

Article Tags :