tokener
A tokener is a software component that reads a stream of characters and converts it into a sequence of tokens that a parser can process. It performs the lexical analysis step of parsing, identifying meaningful symbols such as keywords, punctuation, numbers, and strings, and often tracks the current position in the input for error reporting.
Tokeners are typically designed to be lightweight and may operate incrementally, offering features such as lookahead,
In practice, the term appears in various programming ecosystems. A well-known example is the JSONTokener class
Tokeners are distinct from full parsers: a tokener focuses on breaking input into tokens, while a parser