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

Discussion

An abstract syntax tree is preferred to a parse tree for later phases because

  • A.it omits punctuation and chains of single productions
  • B.it contains more nodes and therefore more information
  • C.it can be built without reference to the grammar at all
  • D.it records the exact sequence of productions applied

Answer: A

The abstract tree keeps operators and operands and discards syntactic scaffolding. Semantic analysis and code generation both become simpler on the smaller structure. The parse tree is often never materialised at all, only the abstract one.

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

Post your comment

Please log in or register to post a comment.