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

Discussion

The reason compilers restrict themselves to L-attributed definitions is

  • A.L-attributed definitions can express strictly more translations
  • B.the general formalism cannot be implemented on real machines
  • C.parser generators refuse to accept any other kind of definition
  • D.evaluation is then guaranteed possible in one left to right pass

Answer: D

The restriction buys a guarantee of cheap evaluation. It is a limitation in principle, but in practice almost every translation a compiler needs can be written within it. The exceptions are unusual enough to be worth restructuring the grammar for.

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

Post your comment

Please log in or register to post a comment.