13 votes 13 votes Which grammar rules violate the requirement of the operator grammar? $A, B, C$ are variables and $a, b, c$ are terminals $A \rightarrow BC$ $A \rightarrow CcBb$ $A \rightarrow BaC$ $A \rightarrow \epsilon$ $(i)$ only $(i)$ and $(ii)$ $(i)$ and $(iii)$ $(i)$ and $(iv)$ Compiler Design isro2015 compiler-design operator-grammar parsing + – go_editor asked Jun 17, 2016 edited Dec 4, 2022 by Lakshman Bhaiya go_editor 6.2k views answer comment Share Follow See all 4 Comments See all 4 4 Comments reply cse23 commented Jun 30, 2016 reply Follow Share option A and D both will violate 2 votes 2 votes dkvg1892 commented Jul 1, 2016 reply Follow Share the above question is incomplete, in original question paper option is given like this: (i) Only (i) and (ii) (i) and (iii) (i) and (iv) Hence answer is D which include both grammar. 3 votes 3 votes anchitjindal07 commented Dec 12, 2017 reply Follow Share dkvg1892 From where this question is taken 0 votes 0 votes Tuhin Dutta commented Mar 27, 2018 reply Follow Share Original question: 1 votes 1 votes Please log in or register to add a comment.
Best answer 15 votes 15 votes A/c to Operator precedence Grammar Two production should not be Adjacent (for exp as they are given in Option A) to each other .And there should not be any Eps Production .Why two production should not be Adjacent to each other is. In general when we write any Mathematical expression in Let take the C Language we are not going to have 2 identifier side by side that is why we should see that Production should not be side by side. So Correct Option Must be A and D because they violate the condition . shekhar chauhan answered Jun 30, 2016 selected Nov 10, 2016 by mcjoshi shekhar chauhan comment Share Follow See all 0 reply Please log in or register to add a comment.
3 votes 3 votes option A operator grammar is racist, it does not let two non terminals come together, in short, no production has either an empty right-hand side or two adjacent nonterminals in its right-hand side. actually option D should also not be allowed rameshbabu answered Jun 17, 2016 rameshbabu comment Share Follow See all 3 Comments See all 3 3 Comments reply khyati commented Jun 27, 2016 reply Follow Share Option D is the answer according to answer key of ISRO. 0 votes 0 votes LeenSharma commented Jun 30, 2016 reply Follow Share Here both Option(A) and option(D) are clearly violating the requirement of the operator grammar. 0 votes 0 votes rameshbabu commented Jul 1, 2016 reply Follow Share yes option D also correct 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes Option A will be right option for it. Because in between two variable there should be exist a terminal then such grammar is called as operator grammar. Example of operator grammar. A→CcBbA→CcBb A→BaCA→BaC A→ϵ Example of not to be operator grammar is A->BCCB Paras Nath answered Oct 14, 2016 Paras Nath comment Share Follow See all 0 reply Please log in or register to add a comment.