Back to the 2019 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 | \epsilon20247mFormal Language & Automata TheoryShow given grammar over alphabet \{a, b\}, verify whether it is ambiguous or unambiguous: S \to aSa \mid bSb \mid a \mid b \mid \epsilon20217mFORMAL LANGUAGE & AUTOMATA THEORYShow that the following grammar is ambiguous: S \rightarrow SS | aSb | bSa | \epsilon20257m Compiler DesignChoose the correct option / answer the following: Which of the following parsers can parse ambiguous grammars? (i) LL(1) (ii) Operator Precedence (iii) CLR(1) (iv) None of the above20242m
PreviousConsider the following languages: GATE[2005] L_1 = \{ww^R \mid w \in \{0, 1\}^*\} L_2 = \{w\#w^R \mid w \in \{0, 1\}^*\} where \# is a special symbol, L_3 = \{ww \mid w \in \{0, 1\}^*\} Which one of the following is true? (i) L_1 is a deterministic CFL (ii) L_2 is a deterministic CFL (iii) L_3 is a CFL, but not a deterministic CFL (iv) L_3 is a deterministic CFLNextConsider the grammar G whose SLR parser has n_1 states and LALR parser has n_2 states. What is the relation between n_1 and n_2? (i) n_1 = n_2 (ii) n_1 < n_2 (iii) n_1 > n_2 (iv) None of the above