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

Discussion

Testing a prepared grammar for the LL(1) property amounts to checking that

  • A.each nonterminal has no more than a single production listed for it
  • B.no right side contains more than one symbol in the whole grammar
  • C.at least one rule of the grammar is recursive on its left hand side
  • D.no table cell ends up holding two different productions

Answer: D

Filling the table from the FIRST and FOLLOW sets and finding every cell single valued is the operational test. A doubly occupied cell names the nonterminal and the token at which one symbol of lookahead proved insufficient, which usually identifies the offending pair of alternatives immediately.

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

Post your comment

Please log in or register to post a comment.