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

Discussion

A syntax directed definition in which an inherited attribute of a symbol depends on a symbol to its right is

  • A.necessarily circular and therefore impossible to evaluate
  • B.an ordinary S-attributed definition written differently
  • C.not L-attributed and cannot be evaluated in one left to right pass
  • D.still L-attributed

Answer: C

The L condition forbids exactly this dependency. Such a definition may still be evaluable, but it needs multiple passes or an explicit topological sort of the dependency graph. Both are avoided in practice by restructuring the grammar instead.

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

Post your comment

Please log in or register to post a comment.