GATE CS 2024 (Afternoon) — Question 65

Compiler DesignLexical Analysis & Parsing Architectures (LL(1), LR(1), LALR)NAT2 marksHard

Consider the following augmented grammar, which is to be parsed with a SLR parser. The set of terminals is \( \{a, b, c, d, \#, @\} \) \( S' \rightarrow S \) \( S \rightarrow SS \mid Aa \mid bac \mid Bc \mid bBa \) \( A \rightarrow d\# \) \( B \rightarrow @ \) Let \( I_0 = \text{CLOSURE} (\{S' \rightarrow \bullet S\}) \). The number of items in the set \( \text{GOTO}(I_0, S) \) is ________.
Practise the full 2024-AN paper
Challenge a friend: WhatsApp Telegram
Recommended book · affiliate linkCompilers: Principles, Techniques & ToolsThe "Dragon Book" for parsing, syntax-directed translation and code generation.
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