Lexical Analysis
The lexical analyser (scanner, lexer) is the first phase of a compiler. It reads the source text character by character, groups the characters into meaningful units called lexemes, and passes one token per lexeme to the parser.
Compiler Design · topic
Tokens, lexemes and patterns, longest match and rule priority, counting tokens in C fragments, lexical errors, input buffering with sentinels, and how a regular expression becomes a DFA for the scanner.
The lexical analyser (scanner, lexer) is the first phase of a compiler. It reads the source text character by character, groups the characters into meaningful units called lexemes, and passes one token per lexeme to the parser.
One-page visual sheets for this topic, in the sheet library on the store. Previews are free; the full sheets come with the subject pack.