Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.compilers > #1351 > unrolled thread

LL vs LR parsing

Started by"SLK Mail" <slkpg4@gmail.com>
First post2014-07-26 16:23 -0700
Last post2014-07-26 16:23 -0700
Articles 1 — 1 participant

Back to article view | Back to comp.compilers


Contents

  LL vs LR parsing "SLK Mail" <slkpg4@gmail.com> - 2014-07-26 16:23 -0700

#1351 — LL vs LR parsing

From"SLK Mail" <slkpg4@gmail.com>
Date2014-07-26 16:23 -0700
SubjectLL vs LR parsing
Message-ID<14-07-061@comp.compilers>
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

[toc] | [standalone]


Back to top | Article view | comp.compilers


csiph-web