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

Discussion

The stack of a table driven predictive parser initially contains

  • A.the start symbol, with the end marker beneath it
  • B.every token of the input, stacked in reverse order
  • C.the FIRST set of the start symbol of the grammar
  • D.nothing at all until the first token has been read

Answer: A

Pushing the marker first and the start symbol above it lets the parser recognise successful completion when the marker surfaces at the same moment the input is exhausted. Using an explicit marker removes the need for a special case in the driver loop.

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

Post your comment

Please log in or register to post a comment.