Please Provide the correct answer for these questions:
You should know how to make grammar LL(1), if possible, to be parsable with only looking at one next token. We use first sets, and follow sets when we have empty productions, and we work on each nonterminal separately. If k>1 on a nonterminal, we apply left-factorization which can make k=1.
1. Is the following LL(1) in its current form? Show your work in detail explaining why yes or why not.
A -> aA | Bca
B -> ba | ϵ | dA
2. Is this LL(1) and why yes/no? Show your detailed work.
A -> aAa | bB
B -> ϵ | bBc
3. Given LL(1) grammar (yes it is LL(1)) pseudocode a recursive descent parser assuming token tk is a global variable, scanner() returns the next token from the program being parsed, and error("...") prints the error message and exits. Assume A is the initial nonterminal. Do not forget the auxiliary function and name your other functions same as the nonterminals. Do not rewrite the grammar as it is LL(1).
A -> cA | Bd
B -> bBa | empty