ISRO | ISRO CS 2013 | Question 5
Shift reduce parsing belongs to a class of
(A) bottom up parsing
(B) top down parsing
(C) recursive parsing
(D) predictive parsing
Explanation: Shift reduce are the class of parsers which built a parse tree in bottom-up manner and scans it from left to right.
In these parsers, through shift step, a single character from the token stream is pushed on the parse stack and becomes a new single-node parse tree.
A reduce step applies a complete grammar production rule to the recent parse trees, joining them together as one tree with a new root symbol.
These parsers include LR parsers which are non-backtracking in nature. Examples: SLR, CLR, LALR etc.
Quiz of this Question