Saturday, November 9, 2019

What is the difference between an intrinsic attribute and a nonintrinsic synthesized attribute?


16. What is the difference between an intrinsic attribute and a nonintrinsic synthesized attribute?
            An intrinsic attribute is an inherent characteristic of a terminal symbol in the grammar (e.g., an identifier in a program). So the value of the attribute is determined solely from the terminal symbol. A nonintrinsic synthesized attribute is an attribute of a non-terminal symbol in the grammar. It’s value depends on the values of the attributes in the children of that non-terminal symbol’s nod in the parse tree.


No comments:

Post a Comment