Back to the 2023 paper
Similar questions
FORMAL LANGUAGE & AUTOMATA THEORYConvert the CFG to GNF: S \to AB \mid BC \\ A \to aB \mid bA \mid a \\ B \to bB \mid cC \mid b \\ C \to c20227mFORMAL LANGUAGE & AUTOMATA THEORYWhich production is not allowed in a CSG? (i) AB \rightarrow BA (ii) A \rightarrow \epsilon (iii) A \rightarrow a (iv) a B \rightarrow a b20252mFormal 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.202214mFORMAL 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
PreviousGiven the Syntax-Directed Definition below with the synthesized attribute val. Draw the annotated parse tree for the expression (3+4) * (5+6) L \to E, L.val = E.val E \to T, E.val = T.val E \to E_1 + T, E.val = E_1.val + T.val T \to F, T.val = F.val T \to T_1 * F, T.val = T_1.val * F.val F \to (E), F.val = E.val F \to digit, F.val = digit.lexvalNextConstruct the predictive parsing table for the following grammars: S \to AaAb | BbBa A \to \epsilon B \to \epsilon