Back to the 2025 paper
Similar questions
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 DesignFor the given grammar and associated semantic rules. Find the output for the input: *aadbd*. S \rightarrow AS \{print(1)\}; S \rightarrow AB \{print(2)\}; A \rightarrow a \{print(3)\}; B \rightarrow bC \{print(4)\}; B \rightarrow dB \{print(5)\}; C \rightarrow e \{print(6)\}20227m Compiler DesignCheck whether the following grammar is LL(1) grammar or not : S \rightarrow iEtSA | a A \rightarrow eS | \epsilon E \rightarrow b20197m Compiler DesignCompute 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) / id20227m