|
|
 |
SEMANTIC ANALYSIS
- Objectives
In the "pure" compiler it would be expected that the formal descriptions of all the language elements would be convertible to implementations that are elements of the compiler. This is primarily true of the lexical and syntactic components, but the semantic module is not yet so well supported. The closest contribution is the "Attribute Grammar". Otherwise the semantic element tends to be a collection of hand-written routines that insert into the parsed code the necessary semantic information.
Actions to be taken by the semantic module include:
- Inserting default conditions
- Completing indentifier descriptions and definitions
- Converting syntactic structures into semantic structures
and finally generating an intermediate code that will be the input for the code generation phase.
Note that the semantic module is the final element in the "front end" of the compiler, and the last portion that is language dependent. From this point on the components are target machine dependent.
- Notes
- Projects
- Assignments
- Examination Questions
- Bibliography
|