Lexical analysis
Lexical tokenization is conversion of a text into (semantically or syntactically) meaningful lexical tokens belonging to categories defined by a "lexer" program. In case of a natural language, those categories include nouns, verbs, adjectives, punctuations etc. In case of a programming language, the categories include identifiers, operators, grouping symbols, data types and language keywords. Lexical tokenization is related to the type of tokenization used in large language models (LLMs) but with two differences. First, lexical tokenization is usually based on a lexical grammar, whereas LLM tokenizers are usually probability-based. Second, LLM tokenizers perform a second step that converts the tokens into numerical values.
Lexical analysis - Wikipedia Jump to content From Wikipedia, the free encyclopedia "Lexer" redirects here. For people with this name, see Lexer (surname) . "Lexing" redirects here. For the Chinese guerrilla leader, see Zhang Lexing . For the mathematician, see Lexing Ying . Conversion of character sequences into token sequences in computer science Lexical tokenization is conversion of a text into (semantically or syntactically) meaningful lexical tokens belonging to categories defined by a "lexer" program. In case of a natural language, those categories include nouns, verbs, adjectives, punctu
Explore this link on the map →related reading
- Scanning · Crafting Interpreterscraftinginterpreters.com
- Beating the fastest lexer generator in Rustalic.dev
- [2605.22821] Tokenisation via Convex Relaxationsarxiv.org
- I blame the tokenizer | David Quareldavidquarel.github.io
- Lexical Analysis With Flex, for Flex 2.6.2: Introductionwestes.github.io
- 2. Kaleidoscope: Implementing a Parser and AST — LLVM 23.0.0git documentationllvm.org
- Which programming languages are most token-efficient? - Martin Aldersonmartinalderson.com
- Reading 12: Regular Expressions & Grammarsweb.mit.edu
- 1. Kaleidoscope: Kaleidoscope Introduction and the Lexer — LLVM 23.0.0git documentationllvm.org
- Semantic Values (Bison 3.8.1)gnu.org
- Language Modelinglena-voita.github.io
- Laurence Tratt: Which Parsing Approach?tratt.net