As can be seen in the screenshot of pdf attached by saurabh, it is confirmed that its L attributed (as semantic actions are placed anywhere). L attributed SDT is parsed in depth first form. But I am not sure how it should evaluate the semantic actions. Should it be evaluated in postfix order or prefix order? Postfix indeed gives option d. However why we should resort to postfix order ? Can anyone summarize the whole solution?