COMPILER DESIGN

SYNTAX ANALYSIS

TOP DOWN AND BOTTOM UP PARSING

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Shift reduce parsers are
A
Bottom up parser
B
Top down parser
C
Top down parserMaybe both
D
None of the mentioned
Explanation: 

Detailed explanation-1: -A shift-reduce parser is a class of efficient, table-driven bottom-up parsing methods for computer languages and other notations formally defined by a grammar. The parsing methods most commonly used for parsing programming languages, LR parsing and its variations, are shift-reduce methods.

Detailed explanation-2: -Shift Reduce Parser is a type of Bottom-Up Parser. It generates the Parse Tree from Leaves to the Root. In Shift Reduce Parser, the input string will be reduced to the starting symbol.

Detailed explanation-3: -A more general form of shift reduce parser is LR parser.

Detailed explanation-4: -The Shift reduce parsing is a type of bottom-up parsing as it generates a parse tree from the leaves (bottom) to the root(up). In shift-reduce parsing, the input string is reduced to the starting symbol.

There is 1 question to complete.