Eliminate all left recursion (direct and indirect) from the following grammar:
S -> S a | B c | d B -> S e | f
For the following grammar
S -> ( L ) | a L -> S T T -> ε | , L
Is the following grammar LL(1)? Explain how you know. Also, if the grammar is not LL(1), write an LL(1) grammar for the same language.
S -> a | b C C -> S | a d