I'm trying to solve this complier design problem related to ambiguity in CFG the given grammar is

\begin{align} &A → AA \\ &A → (A) \\ &A → a \end{align}

I was able to find that this given grammar is ambiguous but I don't know how to remove the ambiguity. How can I remove the ambiguity from the given production rules to get new productions without ambiguity?

  • 4
    $\begingroup$ Have you learned any techniques for removing ambiguity? Have you tried applying them? $\endgroup$ – Yuval Filmus Apr 8 at 10:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.