Lexical Analyzer: phase of compiler takes the pure High level language code as Input and produces stream of Tokens as Output.
Syntax Analyzer: takes stream of Tokens as Input and produces the Parse Tree or Syntax Tree or Derivation Tree as output with the help of CFG Rules.
Semantic Analyzer: takes the Parse Tree as input and generates Annotated Parse as output and verifies the meaning of each and every sentence in the source program with the help of Syntax Directed translation.