Consider the grammar rule. E -> E1 − E2 for arithmetic expressions. If E1 and E2 do not have any common sub expression, in order to get the shortest possible code.
(a) E1 should be evaluated first
(b) E2 should be evaluated first
(c) Evaluation of E1 and E2 should necessarily be interleaved
(d) Order of evaluation of E1 and E2 is of no consequence
I have been asked this question in an online interview.
My question is from L-Attributed Definition topic in portion Syntax Directed Definition and Translations of Compiler