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

Discussion

A production written as E goes to T equals E makes the equals operator

  • A.of lower precedence than every other operator present
  • B.impossible to parse by any deterministic method
  • C.right associative
  • D.left associative in the resulting parse trees

Answer: C

Right recursion produces right leaning trees, so a equals b equals c groups as a equals (b equals c). Assignment is conventionally right associative for exactly this reason. Comparison operators by contrast are usually left associative or non associative.

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

Post your comment

Please log in or register to post a comment.