- Token: Basic units of a code eg: keyword, operator, and identifier.
- Pattern: Rule that specifies a token.
- Lexeme: A set of characters that matches a pattern of a token.
Eg 1: “shiva” is a lexeme that matches a pattern of ‘identifier’ token.
Eg2: "continue” is a lexeme that matches a pattern of ‘keyword’ token.