Parser is a compiler that is used to break the data into smaller elements coming from lexical analysis phase.
A parser takes input in the form of sequence of tokens and produces output in the form of parse tree.
Parsing is of two types: top down parsing and bottom up parsing.
Top down paring
Parse Tree representation of input string "acdb" is as follows:
Bottom up parsing
Parse Tree representation of input string "id * id" is as follows:
Bottom up parsing is classified in to various parsing. These are as follows: