Multiple choice

Consider the following grammar. S $\rightarrow$S * E S $\rightarrow$E E $\rightarrow$F + E E $\rightarrow$F F $\rightarrow$id Consider the following LR (0) items corresponding to the grammar above. (i) S $\rightarrow$ S *.E (ii) E $\rightarrow$ F. + E (iii) E $\rightarrow$ F + .E Given the items above, which two of them will appear in the same set in the canonical sets-of-items for the grammar?

  1. (i) and (ii)

  2. (ii) and (iii)

  3. (i) and (iii)

  4. None of the above

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation