MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

COMPILER DESIGN

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
predictive parser
A
needs backtracking
B
does not need backtracking
C
may not terminate
D
none
Explanation: 

Detailed explanation-1: -A predictive parser is a recursive descent parser that doesn’t need backtracking or backup. It is a top-down parser with no need for backtracking. At each stage, the rule to be extended is chosen based on the next terminal symbol. Hence the correct answer is recursive.

Detailed explanation-2: -The goal of predictive parsing is to construct a top-down parser that never backtracks. To do so, we must transform a grammar in two ways: eliminate left recursion, and. perform left factoring.

Detailed explanation-3: -A predictive parser is a recursive descent parser that does not require backtracking.

Detailed explanation-4: -A predictive parser is an effective technique of executing recursive-descent parsing by managing the stack of activation records, particularly. Input Buffer − The input buffer includes the string to be parsed followed by an end marker $ to denote the end of the string.

Detailed explanation-5: -The predictive parser does not suffer from backtracking.

There is 1 question to complete.