...
Parsers
October 7, 2023
Software-Engineering
October 7, 2023
Parsers
October 7, 2023
Software-Engineering
October 7, 2023

Compiler-Design

Question 50

Which of the following grammar rules violate the requirements of an operator grammar? P,Q,R are nonterminals, and r,s,t are terminals.

    (i) P → Q R

    (ii) P → Q s R
    (iii) P → ε

    (iv) P → Q t R r
A
(i) only
B
(i) and (iii) only
C
(ii) and (iii) only
D
(iii) and (iv) only
Question 50 Explanation: 
Operator values doesn’t contains nullable values and two adjacent non-terminals on RHS production.
i) On RHS it contains two adjacent non-terminals.
ii) Have nullable values.
Correct Answer: B
Question 50 Explanation: 
Operator values doesn’t contains nullable values and two adjacent non-terminals on RHS production.
i) On RHS it contains two adjacent non-terminals.
ii) Have nullable values.

Leave a Reply

Your email address will not be published. Required fields are marked *