Basic Concepts
Syntax: The grammatical form of programs.
Semantics: The meaning of the program
Syntax typically specified by production rules for a context-free grammar using Backus-Naur Form (BNF) or Extended BNF (EBNF)
Semantics sometimes specified formally with special logics.
More often semantics is described less formally but implemented carefully in the code-generation parts of compilers.