2

What is Parsing? Types of Parser | Compiler Design

 1 year ago
source link: https://www.geeksforgeeks.org/videos/what-is-parsing-types-of-parser-compiler-design/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

What is Parsing? Types of Parser

What is Parsing? Types of Parser | Compiler Design
Hello everyone, welcome to gigs for gigs.
  • 20 Views
  • 10/06/2022

In this video, we will be specifically covering what is parsing & the types of parsers are. Parsing is a phase of the compiler that generally takes token strings as input and then tokens are converted into Parse Tree or Syntax Tree. This process of transforming the data from one format to another i.e. from token to Parse Tree is called Parsing.

Parser are mainly of two types: 1) Top-down parser 2) Bottom-up parser

Further Top-down and bottom-up parsers are categorized into different parsers: 1) Top-down Parser: The top-down parser generates parse for any given input string with the help of CFG grammar productions by expanding non-terminals i.e. starting from start symbol, expanding its productions and finally ending on terminals. Top-down parser uses left most derivation.

Top-down parsers can be further classified into two types: Recursive descent parser & Non-recursive descent parser

2) Bottom-up Parser: Bottom-up Parsers generate the syntax tree or parse tree for any given input with help of the grammar productions by compressing non-terminals of Grammar’s RHS i.e. it starts from the existing non-terminals and ends on the start symbol. It uses the reverse of the rightmost derivation.

Bottom-up parsers can be further classified into: - LR parsers & Operator precedence parser:

Types of Parsers in Compiler Design: https://www.geeksforgeeks.org/types-of-parsers-in-compiler-design/


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK