dragon-book-exercise-answers icon indicating copy to clipboard operation
dragon-book-exercise-answers copied to clipboard

Help!! A question to answer 2.2

Open ItsBean opened this issue 3 years ago • 2 comments

image The answer tells me that the grammer is ambiguous by giving the example below, but the example confused me.I don't know why both trees represent the same string . image

ItsBean avatar Jan 25 '22 09:01 ItsBean

Look at the leaves, the upper one has abεaεbε = abab, the lower one has aεbaεbε = abab, so they are the same strings.

magneto0124 avatar Mar 09 '22 10:03 magneto0124

ambiguous parse tree

I'm very much confused with this. The strings are same. But aren't both the trees same?

melvas6 avatar Jun 27 '23 13:06 melvas6