1.how giving priority to + over * and vice versa makes it LALR(1)
for given grammar how to construct LALR(1) grammar
Here there is no point removing left recursion. It is asking
If only one parse tree is desired for any string in the same language
In this particular grammar ambiguity arises because there is no precedence or associativity defined for any non terminal. Therefore changes we will have to make is
1. Decide the precedence of + and *.
2. Decide the associativity of + and *.
These 2 points are taken care by @Digvijay Pandey sir's answer.