Take the 2-minute tour ×  Every undergraduate Intro to Compilers
course reviews the commonly-implemented subsets of context-free
grammars: LL(k), SLR(k), LALR(k), LR(k). We are also taught that
for any given k, each of those grammars is a subset of the next.
What I've never seen is an explanation of what sorts of
programming language syntactic features might require moving to
a different language class. There's an obvious practical
motivation for GLR parsers, namely, avoiding an unholy
commingling of parser and symbol table when parsing C++. But
what about the differences between the two "standard" classes,
LL and LR?  Two questions:    1. What (general) syntactic
constructions can be parsed with LR(k) but not LL(k')?   2. In
what ways, if any, do those constructions manifest as desirable
language constructs?  There's a plausible argument for reducing
language power by making k as small as possible, because a
language requiring many, many tokens of lookahead will be harder
for humans to parse, as well as "ha