GATE CS 2015, set 1 · Question 18 · Compiler Design · Multiple choice (MCQ) · 1 mark · −1/3 for a wrong answer
Which one of the following is TRUE at any valid state in shift-reduce parsing?
- (A) Viable prefixes appear only at the bottom of the stack and not inside
- (B) Viable prefixes appear only at the top of the stack and not inside
- (C) The stack contains only a set of viable prefixes
- (D) The stack never contains viable prefixes
Answer
Answer (C)
Answer from the official GATE CS 2015 answer key.
The step-by-step solution, where available, is part of GATE CS Pro. See what Pro includes