lex
v. · n.-
1 computing/programming (v.) C2 Proficiency Technical Computingto turn a stream of text into small pieces called tokens so a computer can understand it.
to perform lexical analysis on a character stream, converting it into a sequence of tokens for a parser.
ExampleThe compiler needs to lex the source code before it can check for errors.
ExampleThe program failed because it could not correctly lex the unconventional symbols used in the input file.
UsageUsually used as a transitive verb in the context of compiler design.
- tokenize
-
2 short name (n.) B2 Upper Intermediate Informala short, friendly name for people called Alexander or Alexandra.
a hypocoristic or pet form of given names such as Alexander, Alexandra, or Alexis.
ExampleEveryone at the office calls him Lex instead of Alexander.
ExampleLex was chosen as a gender-neutral nickname that suited her preference for brevity over the more traditional Alexandra.
From lexical analysis, from lexical.
Latin lex (“law”).
Etymology adapted from Wiktionary, available under CC BY-SA 4.0.
Last updated June 20, 2026