Discussion
Consider the following statements about compiler phases.
1. The optimisation phase is optional in a working compiler.
2. The symbol table manager interacts with almost every phase.
3. Semantic analysis precedes syntax analysis in the usual order.
Answer: A
Correct answer: 1 and 2 only
The first two are correct. Optimisation is optional - a compiler that omits it produces correct if slower code, which is why compilers offer optimisation levels. And the symbol table manager interacts with almost every phase.
The third reverses the order. Syntax analysis comes first and builds the tree; semantic analysis then walks that tree checking types and scopes. There is no tree for semantic analysis to work on until the parser has produced one.
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