Discussion
A synthesized attributes can be :
(i) Result of attribute evaluation rules.
(ii) The one whose value at a node in a parse tree is defined in terms of its sibling or parent.
(iii) The one whose value at parent node can be determined from its children.
Answer: B
The answer is (i) and (iii) only.
A synthesized attribute is one computed by the semantic rules (attribute evaluation rules) of a production (i), and its value at a parse tree node is determined from the attribute values of that node's children (iii). Information flows upward, as in computing the value of an expression from its operands.
Statement (ii) describes an inherited attribute, whose value at a node depends on its parent and siblings. So options including (ii) are wrong.
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development