adplus-dvertising
frame-decoration

Question

Given the following expression grammar:
E -> E * F | F+E | F

F -> F-F | id

which of the following is true?

a.

* has higher precedence than +

b.

– has higher precedence than *

c.

+ and — have same precedence

d.

+ has higher precedence than *

Posted under Compiler Design

Answer: (b).– has higher precedence than *

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Given the following expression grammar: E -> E * F | F+E | F F -> F-F | id which of the following is true?