I'm resolving indirect left recursion for these production rules:
S -> Aa / a eq1 A -> Sb / b. eq2
S is the starting symbol.
Now I can do this in two ways:
So I'll get the solution (sol1):
S -> Sba /a /ba
S -> aS' / baS' S' -> baS' / epsilon
So I'll get the solution (sol2):
S -> Aa / a A -> abA' / bA' A' -> abA' / epsilon
Both seem to be correct. Which is the correct answer?