Consider the language of strings accepted by the regular exp…
Consider the language of strings accepted by the regular expression (ac)+ | (ad)+. Write an LL(1) grammar for this language. {a, c, d} are terminal symbols. State the start symbol. Write grammar rules in BNF format, e.g. -> c | Compute First and Follow sets for each non-terminal symbol. Write the sets as e.g. First(non-terminal) = { a, b, c } Compute the parse table for the grammar. Write parse table entries as e.g. P[non-terminal, a] = -> c Briefly explain why the grammar is LL(1). (16 pts)
Read Details