Back to the 2019 paper
Similar questions
Compiler DesignChoose the correct answer of the following: Which of the following statement is true? (i) Every left recursive grammar can be LL(1) (ii) LL(1) grammar can be ambiguous (iii) both (i) and (ii) (iv) None of these20232m Compiler DesignGiven a context-free grammar (CFG), compute FIRST and FOLLOW sets for all non-terminals, and construct the LL(1) parsing table. Also, determine whether the grammar is LL(1) or not. Grammar: S \rightarrow A B A \rightarrow a A | \epsilon B \rightarrow b B | \epsilon20247m Compiler DesignConsider the following grammar: S \rightarrow S(S)S/\epsilon (i) Left factor this grammar. (ii) Eliminate left recursion from original grammar. (iii) Is the resulting grammar suitable for top-down parsing?20237m Compiler DesignChoose the correct answer of the following: After removing left recursion from A \rightarrow A\alpha / \beta , the resulting grammar will be (i) A \rightarrow \beta A' (ii) A \rightarrow \alpha A' (iii) A \rightarrow \alpha \beta A'' (iv) A \rightarrow \beta \alpha A'20222m
PreviousChoose the correct answer of the following: In compilers, generation of intermediate code based on an abstract machine model is useful because (i) syntax-directed translations can be written for intermediate code generation (ii) to generate code for real machines directly from high-level language program is not possible (iii) portability of the front end of the compiler is enhanced (iv) implementation of lexical and syntax analyses is easierNextChoose the correct answer of the following: The method which merges the bodies of two loops is (i) loop rolling (ii) loop jamming (iii) constant folding (iv) None of the above