少于 1 分钟阅读

See discussion here: Left recursion in LR(1) parsers. Note that templatetypedef wrote:

LR(1) parsers can handle some types of left recursion, though not all left-recursive grammars are LR(1).

It sounds true, but vacuous, since there exist left-recursive yet ambiguous grammars. Ambiguity becomes the real obstacle in this case.

It’s also obvious that left recursive DCFLs is a subset of $LR(k) \setminus LL(k)$ languages

分类:

更新时间:

留下评论