1
$\begingroup$

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

$\endgroup$
1

1 Answer 1

2
$\begingroup$

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.