Back to the 2022 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 DesignConsider the following grammar: E \rightarrow E+T/T T \rightarrow T*F/F F \rightarrow (E)/id Obtain FIRST and FOLLOW sets of the above grammar.20236mFORMAL LANGUAGE & AUTOMATA THEORYConstruct FOLLOW sets for the grammar: E \to T E' \\ E' \to +\,T\,E' \mid \varepsilon \\ T \to F T' \\ T' \to -\,F\,T' \mid \varepsilon \\ F \to (E) \mid id20227m Compiler DesignConsider the following grammar: E \rightarrow E+T/T T \rightarrow T*F/F F \rightarrow (E)/id Construct Predictive Parsing Table of the above grammar.20238m
PreviousConsider the context free grammar: S \rightarrow SS + | SS * | a; eliminate left factoring and left recursion from the grammar. Does these removals make the grammar suitable for top-down parsing? Justify.NextTranslate the arithmetic expression a + - (b + c) into: (a) Syntax tree (b) Quadruples (c) Triples (d) Indirect Triples