Todos os livros

Profissional

Apps Sobre Coach Entrar Começar a ler

Computer Science · Glossário

O que é Token, lexeme, token class?

Também chamado de: token class · lexeme · token

Definition 1.2 University Computer Science — Year 3 · Capítulo 1 — Lexical Analysis

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.

Ler no capítulo →