This stage of a multi-pass compiler is to remove irrelevant information from the source program that syntax analysis will not be able to use or interpret.
This phase is focused on breaking a sequence of characters into tokens with attributes such as kind, type, value, and potentially others, as well.
In addition to performing semantic analysis at this stage of compilation, often symbol tables are created in order to assist in code generation.
This final stage of a typical compiler converts the intermediate representation of program into an executable set of instructions (often assembly).
More Expressive Languages: Multiple passes obviate the need for forward declarations, allowing mutual recursion to be implemented elegantly.