Are there languages that can be parsed by an LR(k) parser but not by an LL(k′) parser for any k′?
Asked
Active
Viewed 42 times
1
-
Related: https://cs.stackexchange.com/q/43 – Jozef Mikušinec Jun 10 '23 at 14:04
1 Answers
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