Lexeme is basically the unit of a token and it is basically sequence of characters that matches the token and helps to break the source code into tokens.
For example: If the source is x=b
, then the lexemes would be x
, =
, b
and the tokens would be <id, 0>
, <=>
, <id, 1>
.