Discussion
An attribute grammar in which all the attributes are..........is called an.......attributed grammar.
Answer: A
The blanks are Synthesized, S: an attribute grammar in which all attributes are synthesized is S-attributed.
A synthesized attribute of a node is computed from the attributes of its children, so an S-attributed grammar can be evaluated bottom-up, during LR parsing, in one pass.
An L-attributed grammar is the wider class that also allows inherited attributes, but only those depending on the parent and on siblings to the left. So 'Synthesized, L' and 'Inherited, L' mismatch the definition, and 'Inherited, S' contradicts it, since S-attributed grammars have no inherited attributes at all.
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