Back to the 2025 paper
Similar questions
Compiler DesignFind the FIRST an FOLLOW form the following production: S \to aBDh B \to cC C \to bC | \epsilon D \to EF E \to g | \epsilon F \to f | \epsilon20237mFORMAL LANGUAGE & AUTOMATA THEORYEliminate \varepsilon, unit, and useless productions from the grammar: A → bA | Bba | aa B → aba | b | D C → CA | AC | B D → a | \varepsilon20237m Compiler DesignDiscuss ambiguity in grammar. Show that the given grammar is ambiguous: S \rightarrow ABA A \rightarrow aA \mid \varepsilon B \rightarrow bB \mid \varepsilon20257mFormal Language & Automata TheoryBegin with the grammar: S \to ASB / \epsilon A \to aAS / a B \to SbS / A / bb (i) Eliminate \epsilon-productions. (ii) Eliminate unit productions in the resulting grammar. (iii) Eliminate any useless symbol in the resulting grammar. (iv) Put the resulting grammar into CNF.202214m