Back to the 2023 paper

Module 2 : Syntax Analysis (Parser)

20237m

Consider the following grammar:
SS(S)S/ϵS \rightarrow S(S)S/\epsilon
(i) Left factor this grammar.
(ii) Eliminate left recursion from original grammar.
(iii) Is the resulting grammar suitable for top-down parsing?

Similar questions