Given the following expressions of a grammar E → E * F / F + E / F F → F − F / idWhich of the following…
Interpreting slash as the production-alternative separator, subtraction occurs inside F while multiplication uses F operands at the E level. Thus subtraction binds more…
Choose your answer
Given the following expressions of a grammar
E → E * F / F + E / F
F → F − F / idWhich of the following is true ?
Answer and explanation
Correct answer B
Interpreting slash as the production-alternative separator, subtraction occurs inside F while multiplication uses F operands at the E level. Thus subtraction binds more tightly than multiplication. The E productions do not establish the claimed opposite precedence relations.
Practice for these exams
-
UGC NET Computer Science and Applications