IT lexicon › Programming › Lex Scanner

Lex Scanner

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

Unix tool for lexical analysis that generates tokenizers from regular-expression specifications, paired with Yacc.

Eric Schmidt and Mike Lesk developed Lex in 1975 to automate writing scanners. You defined regex patterns and actions in a simple format, and Lex generated a C function that read input and returned tokens. Almost every compiler-construction course from the 1980s onward began with "Lex and Yacc"—a standard pipeline that lives on.

← Back to the lexicon