Intermediate Theory of Computation
Q47 / 100

What is the difference between LL and LR parsing?

Correct! Well done.

Incorrect.

The correct answer is B) LL(k) scans left-to-right with leftmost derivation (top-down); LR(k) scans left-to-right with rightmost derivation in reverse (bottom-up)

B

Correct Answer

LL(k) scans left-to-right with leftmost derivation (top-down); LR(k) scans left-to-right with rightmost derivation in reverse (bottom-up)

Explanation

LL parsers (predictive, recursive descent) are top-down and handle a subset of CFGs. LR parsers (shift-reduce) are bottom-up and handle a larger class of CFGs without ambiguity.

Progress
47/100