Consider the grammar defined by the following production rules, with two operators $∗$ and $+$
Which one of the following is TRUE?
$P \rightarrow Q+P$ here $P$ is to right of $+$
So, $+$ is right associative
Similarly, for $T \rightarrow T *U$ $*$ is left associative as $T$ is to left of $*$
So, answer is B
S -> T * P isn't a recursive production, so it won't define the associativity.
T→T∗U is a recursive production Hence defines left associativity.
Let us consider the 2nd production
T -> T * U
T is generating T*U recursively (left recursive) so * is
P -> Q + P
Right recursion so + is right associative.
So option B is correct.