MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

COMPILER DESIGN

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Which derivation is generated by the bottom-up parser?
A
Right-most derivation in reverse
B
Left-most derivation in reverse
C
Right-most derivation
D
Left-most derivation
Explanation: 

Detailed explanation-1: -Explanation: Bottom-up parser generates the rightmost derivation in reverse.

Detailed explanation-2: -Explanation: A bottom-up parser generates right-most derivation in reverse.

Detailed explanation-3: -Bottom-up parser:-A Bottom-up parser generates the Rightmost derivation in reverse. This corresponds to starting at the leaves of the parse tree also known as shift-reduce parsing.

Detailed explanation-4: -A top-down parser uses the leftmost derivation to generate the string.

Detailed explanation-5: -Bottom-up parsing: It uses the rightmost derivation in Reverse. It is also known as Shift reduce parsing.

There is 1 question to complete.