GATE CS 2022 (Forenoon) — Question 29

Compiler DesignLexical Analysis & Parsing Architectures (LL(1), LR(1), LALR)NAT1 markMedium

Consider the augmented grammar with {+, *, (, ), id} as the set of terminals.
\[ S' \rightarrow S \]
\[ S \rightarrow S + R \mid R \]
\[ R \rightarrow R * P \mid P \]
\[ P \rightarrow (S) \mid id \]
If \(I_0\) is the set of two LR(0) items \(\{[S' \rightarrow S.], [S \rightarrow S. + R]\}\), then goto(closure(\(I_0\)), +) contains exactly ________ items.
Practise the full 2022-FN paper
Challenge a friend: WhatsApp Telegram
From RENYXERAWhat rank do your marks get?GATE score, likely All-India Rank and qualifying marks for your category.
Practise more on Lexical Analysis & Parsing Architectures (LL(1), LR(1), LALR)Timed, in the real exam interface · free to start

A GATE question every morning

One real past-paper question every morning for your branch, answer hidden until you tap. Free on Telegram.

Join
Stuck? Ask in the student group