VOOZH about

URL: https://www.geeksforgeeks.org/compiler-design/difference-between-ll-and-lr-parser/

⇱ Difference between LL and LR parser - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Difference between LL and LR parser

Last Updated : 12 Jul, 2025
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:
Comment
Article Tags:
Article Tags:

Explore