GATE CS 2024 Set 2 | Question 65
Compiler Design › Parser · NAT · 2 marks · Answer: 9
- Question 65Compiler Designnat2 marksAugmented grammar: ; ; ; . With , the number of items in is ___________
Answer: 9
Solution
Answer: 9 moves the dot past in every item with , giving and , then closure of re-adds all -, -, -productions:
That is items.S' -> S. S -> S.S S -> .SS S -> .Aa S -> .bAc S -> .Bc S -> .bBa A -> .d# B -> .@
More GATE PYQ on Parser
All GATE CS Compiler Design PYQ →Attempt GATE CS 2024 Set 2 in real GATE exam mode
Full paper with a timer, the GATE interface and a topic-wise analysis — free.
Create free account →