LL Parser includes both the
recursive descent parser and non-recursive descent parser. Its one type uses backtracking while another one uses parsing table. Theses are top down parser.
Example: Given grammar is
S -> Ac
A -> ab
where S is start symbol, A is non-terminal and a, b, c are terminals.
Input string: abc
Parse tree generated by LL parser:
👁 Image
LR Parser is one of the bottom up parser which uses parsing table (dynamic programming) to obtain the parse tree form given string using grammar productions.
Example: In the above example, parse tree generated by LR parser:
👁 Image
Difference between LL and LR parser: