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

Discussion

A table driven predictive parser uses a stack containing

  • A.the states belonging to a deterministic machine
  • B.the tokens read so far from the input stream
  • C.the semantic values of the expressions parsed so far
  • D.grammar symbols still to be matched or expanded

Answer: D

Correct answer: grammar symbols still to be matched or expanded

The stack of a predictive parser holds what the parser still expects to see. A terminal on top is matched against the input and popped; a nonterminal is replaced by the right side of the production the table selects. It is a direct simulation of the recursive descent call stack without the recursion.

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

Post your comment

Please log in or register to post a comment.