S->(L)|a
L->L,S|S
//Step 1
i=1,j=1
//do nothing
//Step 2
//Substituting S in L production by productions of S
i=2,j=1 to 1
S->(L)|a
L->L,(L)|(L)|L,a|a
//removing left recursion
S->(L)|a
L->aA'|(L)A'
A'->,(L)A'|,aA'|epsilon
But indirect recursion still there in A' production
So how to remove this or am I doing something wrong
This is a question 4.3.1 from Compilers Principles Practice and Tools