Chapter 3 discusses lexical analysis in compilers, explaining the role of the lexical analyzer in recognizing tokens, the design of a lexical analyzer generator, and the use of finite automata. It covers token specifications, recognition mechanisms, error handling, regular expressions, and the implementation of lexical analyzers. Additionally, it contrasts deterministic and nondeterministic finite automata in terms of their efficiency and structure.