2

I'm trying to establish (through constructing a Hasse diagram) the subset relationship between the classes of languages that can be parsed by $\operatorname{LL}(k)$ and $\operatorname{LR}(k)$ parsers. My guess is that

$$\operatorname{LL}(0) \subset \operatorname{LL}(1) \subset \operatorname{LL}(2) \subset \dots \\ \cap \phantom{\operatorname{LL}(0)} \cap \phantom{\operatorname{LL}(0)} \cap \phantom{\operatorname{LL}(0)}\\ \operatorname{LR}(0) \subset \operatorname{LR}(1) \subset \operatorname{LR}(2) \subset \dots$$

but I'm not sure if that's correct. Can someone verify this?

To further understand the relationship, I'd also like to find out:

  • Am I correct in thinking $\bigcup_{k=0}^\infty \operatorname{LR}(k) =$ $\mathrm{DCFL}$?
  • What about $\bigcup_{k=0}^\infty \operatorname{LL}(k)$?
  • Where would the class of $\operatorname{LL}(^*\!)$-parsable languages fit into this diagram?
lynn
  • 3,418
  • Your question is answered here: https://cs.stackexchange.com/q/43. Your diagram becomes true when you replace $LR(n+1) ⊂ LR(n+2)$ with $LR(n+1) = LR(n+2)$ for every $n$ – Jozef Mikušinec Jun 10 '23 at 13:58

0 Answers0