MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

COMPILER DESIGN

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
What is the other name for predictive parser?
A
LL (1)
B
Non-Recursive Descent Parser
C
Both
D
None of the above
Explanation: 

Detailed explanation-1: -Predictive parsing is a special form of recursive descent parsing, where no backtracking is required, so this can predict which products to use to replace the input string. Non-recursive predictive parsing or table-driven is also known as LL(1) parser.

Detailed explanation-2: -A predictive parser is a recursive descent parser with no backtracking or backup. It is a top-down parser that does not require backtracking. At each step, the choice of the rule to be expanded is made upon the next terminal symbol.

Detailed explanation-3: -A form of recursive-descent parsing that does not require any back-tracking is known as predictive parsing. It is also called as LL(1) parsing table technique since we would be building a table for string to be parsed. It has capability to predict which production is to be used to replace input string.

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

There is 1 question to complete.