ENGLISH
REFERENCE

lex

v. · n.
US //ˈɫɛks// lex
  1. 1 computing/programming (v.)
    C2 Proficiency Technical Computing

    to 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.

    Example

    The compiler needs to lex the source code before it can check for errors.

    Example

    The program failed because it could not correctly lex the unconventional symbols used in the input file.

    Usage

    Usually used as a transitive verb in the context of compiler design.

    • tokenize
  2. 2 short name (n.)
    B2 Upper Intermediate Informal

    a short, friendly name for people called Alexander or Alexandra.

    a hypocoristic or pet form of given names such as Alexander, Alexandra, or Alexis.

    Example

    Everyone at the office calls him Lex instead of Alexander.

    Example

    Lex was chosen as a gender-neutral nickname that suited her preference for brevity over the more traditional Alexandra.

Etymology 1

From lexical analysis, from lexical.

Etymology 2

Latin lex (“law”).

Etymology adapted from Wiktionary, available under CC BY-SA 4.0.

Related words

Last updated June 20, 2026