InterviewSolution
Saved Bookmarks
| 1. |
Which one of the following is true at any valid state in shift-reduce parsing?(a) At the bottom we find the prefixes(b) None of the mentioned(c) Stack contains only viable prefixes(d) Stack consists of viable prefixesI got this question at a job interview.Enquiry is from Predictive Top-Down Parsing topic in division Topdown Parsing of Compiler |
|
Answer» RIGHT answer is (C) Stack CONTAINS only viable prefixes To elaborate: The prefixes on the stack of a shift-reduce parser are CALLED viable prefixes. |
|