Define identifiers, literals, operators, comments, whitespace, and reserved words. Implement a lexer that preserves source positions and reports malformed tokens clearly.