Discussion
Type checking is naturally expressed as a syntax directed translation because
Answer: C
Correct answer: the type of an expression is synthesised from those of its operands
The type of a sum follows from the types of its two operands, which follow from theirs, all the way down to the identifiers and constants. That is a purely synthesised computation, so type checking fits an S-attributed definition and can be done during a bottom up parse.
No comment is present. Be the first to comment.
Loading…
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