Can someone answer this for me? you need to do is derive the parse trees applicable for the following ambiguous grammar. Re-write it's unambiguous grammar and derive the parse tree.

• S → aSbS l bSaS l ε

• A → aA | Aa | ε

• A → A + A | A − A | a

• A→ A + A A → A * A A→ A ^ A A→ s

• S → aSb | SS S →ε

complete answer please

  • 2
    $\begingroup$ It doesnt appear like the OP tried to solve this problem, and it looks like his homework. $\endgroup$ – nir shahar Apr 28 at 6:06
  • $\begingroup$ This is a homework dump. Surely you can solve at least some of the parts? Let us know if you are stuck on one of them which appears particularly difficult. $\endgroup$ – Yuval Filmus Apr 28 at 6:24

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.