Semantics Analysis

The semantic analyzer of a compiler, makes use of the parse tree generated by the Syntax Analysis phase and the symbol table generated by the Lexical Analysis phase to verify the semantic consistency of the code. It is what makes sure that the source code has meaning, and is not just blindly following the syntax. It does things like checking if functions are called with proper arguments, and type mismatches.