- Can create LR(k) and LALR(k) parsers in addition to LL(k).
The extra lookahead is added to the k=1 machine in all cases. For LR this
means the parser falls somewhere between LR(1) and LR(k). The construction
is similar to the way SLR is done, but to the LR(1) machine instead of the
The LL(k) parsers are strong LL(k) by definition. Aho and Ullman have
shown that all LL(k) grammars have covering strong LL(k) grammars that are
easily constructed, if somewhat larger. SLK has an option to do this
transparently, resulting in full LL(k) support.
SLK uses well-known table compaction methods to greatly reduce the size of
the parser. In combination with modern RAM size, this makes LR(k) and
LL(k) parsing feasible.
The LR(2) parsers for the extra lookahead problems in LR and LALR grammars
that have come up in this newsgroup over the years seem to work fine. If
anyone has a deterministic grammar that is not handled properly by SLK,
please email me directly.
SLK Parser Generator: http://www.slkpg.com