GATE CS 2021 Set 2 | Question 61
Compiler Design › Parser · NAT · 2 marks · Answer: 8
- Question 61Compiler Designnat2 marksConsider the following augmented grammar with as the set of terminals.
Let . The number of items in the set is ______.S' -> S S -> S # c S S -> S S S -> S @ S -> < S > S -> a S -> b S -> cAnswer: 8
Solution
Computing gives the item plus the closure on ; taking on again reproduces the same kernel item with its closure, yielding 8 items in total.
More GATE PYQ on Parser
All GATE CS Compiler Design PYQ →Attempt GATE CS 2021 Set 2 in real GATE exam mode
Full paper with a timer, the GATE interface and a topic-wise analysis — free.
Create free account →