IT lexicon › Programming › Lex

Lex

Programming På svenska → Updated: 2026-11-13

Tool from 1975 that generates lexical analyzers from regular expressions, part of the Unix compiler toolkit.

Lex, developed by Mike Lesk at AT&T Bell Labs, automated the tedious process of building tokenizers. Instead of hand-coding a scanner that recognized language tokens, programmers could describe tokens as regular expressions and Lex would generate the scanner code. Paired with Yacc for parser generation, Lex became essential infrastructure for compiler construction and shaped how parsing tools were built for decades. It demonstrated the power of code generation for compiler development.

← Back to the lexicon