2081 11

CSC376 · 2081 · 5 marks

Describe the synthesized attribute and inherited attribute with an example.

Describe the synthesized attribute and inherited attribute with an example. [5]

Compiler Design and ConstructionChapter 2: Lexical, Syntax and Semantic AnalysisAttribute Types

Definition: Attributes of a node that are derived from its children nodes are called synthesized attributes. - Information flows bottom-up in the parse tree (from children to parent). - A node's attribute value is computed from the attribute values of its children. Definition: Attributes which ar...