...
Parsers
October 10, 2023
UGC NET CS 2009 Dec-Paper-2
October 10, 2023
Parsers
October 10, 2023
UGC NET CS 2009 Dec-Paper-2
October 10, 2023

Compiler-Design

Question 293
Top-down parsers are predictive parsers, because :
A
next tokens are predicted.
B
length of the parse tree is predicted beforehand
C
lowest node in the parse tree is predicted.
D
next lower level of the parse tree is predicted.
Question 293 Explanation: 
→ Top-down parsers are predictive parsers, because next tokens are predicted.
→ 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.
→ Predictive parsing uses a stack and a parsing table to parse the input and generate a parse tree.
Correct Answer: A
Question 293 Explanation: 
→ Top-down parsers are predictive parsers, because next tokens are predicted.
→ 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.
→ Predictive parsing uses a stack and a parsing table to parse the input and generate a parse tree.
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!