-5

S-> A|B|AB

A-> aA, B-> bB, A->€, B->€

€ is the empty string.

Find a string and show that it has two

a-) parse trees b-) leftmost derivations c-) rightmost derivations

Cœur
  • 37,241
  • 25
  • 195
  • 267
Tihyros
  • 15
  • 1
  • 5

1 Answers1

1

We're not gonna do your homework.

Build the parse tree using leftmost and rightmost derivations. If you can find any ambiguity, it is ambigious.

S-> A|B|AB is the key part. Try using both A, B and AB.

Filip Haglund
  • 13,919
  • 13
  • 64
  • 113