Back to the 2019 paper
Similar questions
Compiler DesignFor a grammar G, shift reduce (S-R) conflicts are present in LALR(1) parser, if and only if (i) The LAR (1) parser for G has S.R conflicts (ii) The LR(0) parser for G has S.R conflicts (iii) The SLR(1) parser for G has S.R conflicts (iv) The SLR(0) parser for G has S.R conflicts20232m Compiler DesignChoose the correct answer of the following: For a grammar G, shift reduce (S-R) conflicts are present in LALR(1) parser, if and only if (i) the LR(1) parser for G has S-R conflicts (ii) the LR(0) parser for G has S-R conflicts (iii) the SLR(1) parser for G has S-R conflicts (iv) the SLR(0) parser for G has S-R conflicts20192m Compiler DesignChoose the correct answer of the following: If a grammar is LALR(1), then it is necessarily (i) SLR(1) (ii) LR(1) (iii) LL(1) (iv) None of the above20222m Compiler DesignChoose the correct answer of the following: Which one of the following statements is true? (i) Canonical LR parser is more powerful than LALR parser. (ii) SLR parser is more powerful than LALR. (iii) LALR parser is more powerful than canonical LR parser. (iv) SLR parser, canonical LR parser and LALR parser all have the same power.20192m
PreviousConsider the following statements about the context-free grammar: (1) G = \{S \to SS, S \to ab, S \to ba, S \to \epsilon\} (2) G is ambiguous (3) G produces all strings with equal number of a's and b's G can be accepted by a deterministic PDA. Which combination below expresses all the true statements about G? (i) 1 only (ii) 1 and 3 (iii) 2 and 3 (iv) 1, 2 and 3NextLet w be any string of length n in \{0, 1\}^*. Let L be the set of all substrings of w. What is the minimum number of states in a non-deterministic FA that accepts L? (i) n - 1 (ii) n (iii) n + 1 (iv) 2n - 1