Back to the 2022 paper
Similar questions
Compiler DesignConstruct LALR(1) parsing table for the following grammar. Also prove that this is not SLR(1). S \rightarrow Aa | bAc | dc | bda A \rightarrow d202214m 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: 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 Compiler DesignConsider the following grammar: S \rightarrow CC C \rightarrow cC/d Construct CLR(1) and LALR(1) parsing table.20239m