COMPILER DESIGN

SYNTAX ANALYSIS

ROLE OF THE PARSER

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 parser is a recursive descent parser, which has the capability to predict which production is to be used to replace the input string. The predictive parser does not suffer from backtracking. To accomplish its tasks, the predictive parser uses a look-ahead pointer, which points to the next input symbols.

Detailed explanation-2: -Predictive Parser is also another method that implements the technique of Top-Down parsing without Backtracking. A predictive parser is an effective technique of executing recursive-descent parsing by managing the stack of activation records, particularly.

Detailed explanation-3: -The predictive parser uses a look-ahead pointer, which points to the next input symbols. To make the parser back-tracking free, the predictive parser puts some constraints on the grammar. It accepts only a class of grammar known as LL(k) grammar. Hence, Predictive Parser is also known as LL(1) Parser.

Detailed explanation-4: -The top down parsing is known as recursive parsing or predictive parsing.

There is 1 question to complete.