CSC262 · 2079 · 10 marks
Given the following expression grammar for simple arithmetic expression with operator + and *. Remove the left recursion from this grammar then simplify and convert to CNF.EâE+TâŁTE \rightarrow E+T \mid TEâE+TâŁTTâT+FâŁFT \rightarrow T+F \mid FTâT+FâŁFFâ(E)âŁaF \rightarrow (E) \mid aFâ(E)âŁa
Given the following expression grammar for simple arithmetic expression with operator + and *. Remove the left recursion from this grammar then simplify and convert to CNF.EâE+TâŁTE \rightarrow E+T \mid TEâE+TâŁTTâT+FâŁFT \rightarrow T+F \mid FTâT+FâŁFFâ(E)âŁaF \rightarrow (E) \mid aFâ(E)âŁa[10]
Theory of ComputationChapter 4: Context Free GrammarChomsky Normal FormNumerical: Grammar left recursion CNF conversion