Web•The lexing (or lexical analysis) phase of a compiler breaks a stream of characters (source text) into a stream of tokens. • Whitespace and comments often discarded • A token is a sequence of characters treated as a unit (a lexeme) along with an token type: • identifier tokens: x, y, foo, ... • integer tokens: 0, 1, -14, 512, ... • if tokens: if • Algebraic datatypes …