tags:

views:

386

answers:

1

I guess the same logic is applied in both of them, i.e replacing the matched strings with the corresponding non-terminal elements as provided in the production rules.

Why do they categorize LL as top down and LR as bottom-up?

+2  A: 

Bottom up parsing:

Bottom-up parsing (also known as shift-reduce parsing) is a strategy for analyzing unknown data relationships that attempts to identify the most fundamental units first, and then to infer higher-order structures from them. It attempts to build trees upward toward the start symbol.

Top-down parsing:

Top-down parsing is a strategy of analyzing unknown data relationships by hypothesizing general parse tree structures and then considering whether the known fundamental structures are compatible with the hypothesis.

Eli Bendersky
can u illustrate it with a small example of a string and few production rules?
CadetNumber1
@ashish: read the links (wikipedia) first - they contain examples too, and valuable links to other resources. These issues are too complex to be efficiently demonstrated with a single small example
Eli Bendersky