Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App

Related Articles

GATE | GATE CS 1997 | Question 6

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

In the following grammar

X :: = X ⊕ Y / Y
Y :: = Z * Y / Z
Z :: = id

Which of the following is true?
a. ‘⊕’ is left associative while ‘*’ is right associative
b. Both ‘⊕’ and ‘*’ are left associative
c. ‘⊕’ is right associative while ‘*’ is left associative
d. None of the above
(A) a
(B) b
(C) c
(D) d

Answer: (A)

Explanation: X :: = X ⊕ Y is left recursive grammar, so ‘⊕’ is left associative and Z * Y is right recursive grammar, so ‘*’ is right associative.

Quiz of this Question

My Personal Notes arrow_drop_up
Last Updated : 17 Jan, 2020
Like Article
Save Article
Similar Reads