Machine-translated by Google. Questions are authored in English.
Top

Discussion

Removing all epsilon productions from a grammar

  • A.always makes the grammar ambiguous as a side effect
  • B.reduces the number of productions in every case
  • C.is possible without changing the language, except for the empty string
  • D.is quite impossible for any grammar containing recursion of any kind

Answer: C

Standard constructions eliminate epsilon productions, usually at the cost of many more productions. The empty string itself must be handled separately if the language contains it. The construction is theoretical groundwork rather than a step compilers perform.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.