A token class is a set of strings, given by a pattern (in practice a regular expression), that the parser treats alike: identifier, number, the keyword while, the operator <=. A lexeme is one substring of the source that belongs to a token class. A token is the pair of a token class and the information the later phases need about the lexeme: its value for a number, its spelling for an identifier, nothing more for a keyword or an operator.
书籍暂未推出简体中文版——当前显示英文版。
Computer Science · 术语表
什么是 Token, lexeme, token class?
又称: token class · lexeme · token