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

Discussion

At every point during a successful shift reduce parse, the stack together with the remaining input forms

  • A.a right sentential form of the augmented grammar
  • B.a left sentential form derived from the original start symbol
  • C.a string of terminals with no nonterminal symbols present at all
  • D.the complete parse tree of the program written out in linear form

Answer: A

This invariant is what the whole method rests on. Each reduction moves backward one step along a rightmost derivation, so the concatenation of stack and input is always a right sentential form until the start symbol alone remains.

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

Post your comment

Please log in or register to post a comment.