Alle boeken

Professioneel

Apps Over Coach Inloggen Begin met lezen

Computer Science · Begrippenlijst

Wat is Token, lexeme, token class?

Ook bekend als: token class · lexeme · token

Definition 1.2 University Computer Science — Year 3 · Hoofdstuk 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.

Lees in het hoofdstuk →