The first phase when building a compiler, the lexical analysis.
Lexical analysis of a compiler in Python.