|LL vs LR parsing firstname.lastname@example.org (SLK Mail) (2014-07-26)|
|From:||"SLK Mail" <email@example.com>|
|Date:||Sat, 26 Jul 2014 16:23:03 -0700|
|Posted-Date:||26 Jul 2014 17:12:13 EDT|
It does seem odd that all LR grammars can be made LR(1), but not the case
with LL. Intuitively, it may be that the constructive vs predictive nature
of the two is the cause. In LR, you only know what you have after you have
found it. In LL, you must predict what you think you have based on the
lookahead. So more lookahead equals more predictive power.
SLK now can generate LR(k) parsers in addition to LL(k). Parsing geeks may
be interested to know that the lookahead algorithm is the same for both.
This is because at any point in a parse, the lookahead is independent of
the direction of parse tree construction, i.e. up or down.
Return to the
Search the comp.compilers archives again.