Computer Science EngineeringHard

Compared with a parse tree, an abstract syntax tree

  1. A. omits redundant non-terminal nodes and punctuation
  2. B. always has more nodes
  3. C. has only terminals as internal nodes
  4. D. cannot represent operators

Correct answer: A. omits redundant non-terminal nodes and punctuation

An abstract syntax tree keeps only the structurally meaningful operators and operands.

More Theory of Computation, Compilers & Digital Logic (ISRO CS) questions

Exams that ask this topic