For context free languages, I wonder that if all LL(k) languages can be recognized by a LR(1) grammar?
Asked
Active
Viewed 101 times
1 Answers
1
Yes. See Language theoretic comparison of LL and LR grammars. In particular, https://cs.stackexchange.com/a/48/755 says $LL \subset LR(1)$, where $LL = \cup_k LL(k)$, hence $LL(k) \subseteq LL \subset LR(1)$ for all $k$.
See also Does my grammar contradict LL ⊆ LR(1)?. Make sure to distinguish between a grammar vs the language accepted by the grammar.
D.W.
- 167,959
- 22
- 232
- 500