GATE CS 2021 (Forenoon) — Question 15

Compiler DesignLexical Analysis & Parsing Architectures (LL(1), LR(1), LALR)MCQ1 mark · −1/3 if wrongMedium

Consider the following statements: \(S_1\) : Every SLR(1) grammar is unambiguous but there are certain unambiguous grammars that are not SLR(1). \(S_2\) : For any context-free grammar, there is a parser that takes at most \(O(n^3)\) time to parse a string of length \(n\). Which one of the following options is correct?
  1. A
    \(S_1\) is true and \(S_2\) is false
  2. B
    \(S_1\) is false and \(S_2\) is true
  3. C
    \(S_1\) is true and \(S_2\) is true
  4. D
    \(S_1\) is false and \(S_2\) is false
Practise the full 2021-FN paper
Challenge a friend: WhatsApp Telegram
From RENYXERAPractise this subject in the exam simulatorTimed, GATE-style tests with analytics that find your weak topics.
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