In case of L attributed definition the semantic action is embedded to the immediate left of the non-terminal in a production. In case of S attributed definition the semantic action is embedded at the end of a production
As bottom up parsers cannot handle L attributed definitions so we convert L attributed definitions to S attribute definitions
How we do it?
By introducing a redundant non-terminal
Given grammar
E->TE'
E'->*T { printf('*') ;} E' | epsilon
T-> id {printf (id.name) ;}
the highlighted semantic action is not placed in the end of the production. so it is not S attributed. Remaining are S attributed
E->TE'
E'->*T M E' | epsilon
M->epsilon { printf('*') ;}
T-> id {printf (id.name) ;}
Both the grammars are equivalent
Option B is correct