edited by
1,435 views
0 votes
0 votes
Given P,Q,R  are non- terminals and r , s ,t are terminals ,

which of the following grammar rule(s)  violate the requirements of an operator grammar

I P->QR

II P->QsR

III P-> ^

IV  P->Q+Rr

A) I  only   B)    I and III only   C)   II and III only   D)  III and IV only
edited by

1 Answer

0 votes
0 votes
If grammar  contains :

1)  nullable variable

 2) 2 adjacent non-terminal on RHS of production

then it's not an operator grammar

so option A is correct.

Related questions

0 votes
0 votes
2 answers
1
0 votes
0 votes
0 answers
3
Rahul Ranjan 1 asked May 29, 2018
514 views
Given an operator grammar :$E - E * F / F + E / F$$F - F - F / id$ Is this table correct for the above operator grammar ?