Compiler - Semantics Analysis

Table of Contents

1 - About

Semantic analysis is the phase in which the compiler:

This phase performs semantic checks such as:

  • type checking (checking for type errors),
  • or object binding (associating variable and function references with their definitions),
  • or definite assignment (requiring all local variables to be initialized before use), rejecting incorrect programs or issuing warnings.

Semantic analysis usually requires a complete parse tree, meaning that this phase logically follows the parsing phase, and logically precedes the code generation phase.

code/compiler/semantic_analysis.txt ยท Last modified: 2017/09/17 17:36 by gerardnico