You are on page 1of 1

What is the difference between an intrinsic attribute and a nonintrinsic

synthesized attribute?

1. An intrinsic attribute is an inherent characteristic of a terminal symbol in


the grammar, for example - an identifier in a program. So the value of
the attribute is determined completely from the terminal symbol.

2. A non-intrinsic synthesized attribute is an attribute of a non-terminal


symbol in the grammar. Its value depends on the values of the attributes in the
children of that non-terminal symbol’s nod in the parse tree.

3. Intrinsic attributes are synthesized attributes of leaf nodes where values


are determined outside the parse tree. It means that the value of which is
known before the sentence is parsed, these attributes pass external
information (such as from the symbol table) up to the parse tree whereas
nonintrinsic means the opposite, the values are not determined.

You might also like