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

Discussion

A parser reading a program that is syntactically correct but semantically meaningless will

  • A.accept it and pass it to the semantic analyser to be rejected
  • B.reject it because the grammar covers meaning as well as form
  • C.loop indefinitely since no production applies to the input
  • D.produce target code without any further checking at all

Answer: A

The parser judges form alone. A statement adding a string to a function name parses perfectly well and is rejected only when types are checked. Form and meaning are genuinely separate questions and are answered by separate phases.

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

Post your comment

Please log in or register to post a comment.