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

Discussion

After left recursion has been removed, the auxiliary nonterminal introduced by the transformation always

  • A.has an epsilon alternative so the repetition is able to terminate
  • B.carries the same name as the nonterminal from which it was derived
  • C.appears on the left of at least two distinct productions of its own
  • D.becomes the new start symbol of the grammar that has been produced

Answer: A

Without the epsilon alternative the new nonterminal could never be discharged and the repetition would be obliged to continue for ever. The epsilon alternative is precisely what converts unbounded left recursion into a loop that the parser can leave, and it is also why FOLLOW must be consulted when the table is filled

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

Post your comment

Please log in or register to post a comment.