1

Are there languages that can be parsed by an LR(k) parser but not by an LL(k′) parser for any k′?

D.W.
  • 159,275
  • 20
  • 227
  • 470
Gator
  • 11
  • 1

1 Answers1

2

Yes, $\{a^i b^j c \mid i \ge j \ge 0\}$ can be parsed by a $LR(0)$ parser but not by any $LL(k')$ parser for any $k'$. See How does $LL(n)$ languages compare with $LR(0)$, for $n>0$?.

See also https://stackoverflow.com/q/36652221/781723 and Language theoretic comparison of LL and LR grammars.

D.W.
  • 159,275
  • 20
  • 227
  • 470