Back to the 2022 paper
Similar questions
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?20237mCompiler DesignHandle pruning forms the basis of........ (i) Bottom up parsing (ii) Top down parsing (iii) Predictive parsing (iv) Recursive descent parsing20232m Compiler DesignChoose the correct answer of the following: To convert an arbitrary CFG to an LL(1) grammar (i) factor the grammar alone (ii) remove left recursion alone (iii) remove left recursion and factor the grammar (iv) None of the above20192m Compiler DesignChoose the correct answer of the following: Handle pruning forms the basis of ...........? (i) Bottom up parsing (ii) Top down parsing (iii) Predictive parsing (iv) Recursive descent parsing20232m
PreviousFind the three-address codes of the following program. There are four bytes per word: ``c Sum = 0; for (i = 1; i<=20; i++) Sum = Sum + a[i] + b[i]; ``NextCompute FIRST and FOLLOW for the given grammar. Also derive the LL(1) parsing table. E \rightarrow TE' E' \rightarrow + TE' / \epsilon T \rightarrow FT' T' \rightarrow * FT' / \epsilon F \rightarrow (E) / id