SYNTAX ANALYSIS
ROLE OF THE PARSER
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
Tracking declaration of a variable
|
|
Correct use of L and R values
|
|
All the above
|
|
None of these
|
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.