COMPILER DESIGN

SYNTAX ANALYSIS

ROLE OF THE PARSER

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Inherited attribute is a natural choice in
A
Tracking declaration of a variable
B
Correct use of L and R values
C
All the above
D
None of these
Explanation: 

Detailed explanation-1: -Explanation: Inherited attribute is a natural choice in variable declarations record is maintained.

Detailed explanation-2: -The inheritance attribute of a class indicates whether processes in the class should be automatically reclassified when one of the classification attributes of the process changes.

Detailed explanation-3: -An attribute of a node (non-terminal) that depends on the value of attributes of children nodes in the parse tree is called inherited attribute.

Detailed explanation-4: -On other hand an attribute is said to be Inherited attribute if its parse tree node value is determined by the attribute value at parent and/or siblings node. In case of S → ABC if A can get values from S, B and C. B can take values from S, A, and C.

There is 1 question to complete.