In a bottom-up evaluation of a syntax directed definition its inherited attributes can do which of the following?

Pham Quỳnh

New member
In a bottom-up evaluation of a syntax directed definition its inherited attributes can do which of the following?
A. Always evaluated
B. Can be evaluated if the definition is L attributed
C. Can be evaluated if the definition has synthesized attributes
D. Never be evaluated
 
Answer: b
Explanation: A Syntax Directed Definition (SDD) is called S Attributed if it has only synthesized attributes. Also the L-Attributed Definitions contain both synthesized and inherited attributes but do not need to build a dependency graph to evaluate them.
 

Tìm kiếm

Back
Top