I'm unsure how to finish the left recursion removal algorithm for this grammar.
S ::= a B | B S b | S a | S B A | b
B ::= S b A | B B | A S B | a
D ::= b a | S b
A ::= b S A | b | a b
Here is my working.
using the order S, B, D, A.
S ::= a B M | B S b M | b M
M ::= a M | B A M | ε
B ::= a B M b A | B S b M b A | b M b A | B B | A S B | a
B ::= a B M b A N | b M b A N | A S B b A N | a N
N ::= S b M N | B N | ε
How should I progress from here?