Related articles |
---|
LL vs LR parsing slkpg4@gmail.com (SLK Mail) (2014-07-26) |
From: | "SLK Mail" <slkpg4@gmail.com> |
Newsgroups: | comp.compilers |
Date: | Sat, 26 Jul 2014 16:23:03 -0700 |
Organization: | SLK Systems |
Keywords: | parse, tools |
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.
http://slkpg.1eko.com
Return to the
comp.compilers page.
Search the
comp.compilers archives again.