someone please explain how to draw operator precedence table to solve this question.
strings in the language generated by this grammar: adcb, aadcbb, aaadcbbb, ... so on
It's an unambiguous grammar. So this grammar decides its own rule.
Rules: 1. a=b, a and b have the same precedence. 2. a is right associative hence, hence a<a 3. d is highest precedence terminal hence d>c, d>b, d>a 4. c has higher precedence than a and b, so c>a, c>b
(D) is incorrect precedence relation!
To understand more on operator precedence parsing: https://www.tutorialspoint.com/compiler_design/operator_precedence_parsing.asp
64.3k questions
77.9k answers
244k comments
80.0k users