With recursive-descent parsing, direct/indirect left recursive rules do not allow top-down parsing.
How would this grammar be converted to be non-left recursive?
S-> Aa | b, A -> Ac | Sd | epsilon
I have gotten this far but I am not sure if it is correct.
S-> bS'
S'-> epsilon | AaS'
A-> SdA'
A'-> cA'
I wasn't sure if the 'S' rule had to be changed since it did not have an 'S'(itself) in it. From reading online, it looked like each rule should be checked before starting to change it but I'm a bit stuck right now. Does anyone know if this is the right approach or have any suggestions?