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

Discussion

Computing FIRST sets requires iteration until no set changes because

  • A.the FOLLOW sets must be computed at the same time
  • B.the sets of one nonterminal depend on those of others
  • C.the grammar may contain an unbounded number of productions
  • D.the terminals of the grammar are not known in advance

Answer: B

The dependencies can be cyclic, so a single pass may miss contributions. Repeating until a fixed point is reached is the standard way to solve such a system of set equations. The same fixed point technique reappears later in data flow analysis.

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

Post your comment

Please log in or register to post a comment.