English dictionary, thesaurus, translations & etymology
FreeDict.com
noun Uncommon

lex

lehks

Lex (noun) means a law, especially one from ancient Roman legal tradition. Example: “Historians still study the leges of the Roman Republic.”

noun
1
A law, especially one from ancient Roman legal tradition.
"Historians still study the leges of the Roman Republic."
verb
1
(computing) To break a stream of text into a sequence of tokens as the first stage of processing code.
"The compiler will lex the source file before parsing it."

How to Use Lex

Learner’s notes

In plain EnglishEither a formal Latin term for "law," or programmer shorthand for scanning code into tokens.

When to use it

The Latin legal sense is academic/historical; the computing sense is technical jargon.

Word Forms

lexed past tense, lexes plural, leges plural, lexes singular

Study it as flashcards or scroll it in Flow — saved to your collection.
Test yourself on “lex” A quick quiz — meaning, synonyms & usage

Fill the Gap

Can you complete this real example?

The compiler will _____ the source file before parsing it.

Etymology

Latin lex, meaning "law." The computing sense comes from "lexical analysis," shortened to "lex."

Origin: Latin

Rhymes for lex

See all rhymes for lex →

Frequently Asked Questions

What does “lex” mean?

The word “lex” means a law, especially one from ancient Roman legal tradition. In plain terms, either a formal Latin term for "law," or programmer shorthand for scanning code into tokens.

How do you pronounce “lex”?

“Lex” is pronounced lehks (/lɛks/ in IPA).

How do you use “lex” in a sentence?

Here is “lex” used in a sentence: “The compiler will lex the source file before parsing it.”

What part of speech is “lex”?

Depending on how it is used, “lex” can be a noun and a verb.

Where does the word “lex” come from?

The word “lex” comes from Latin. Latin lex, meaning "law." The computing sense comes from "lexical analysis," shortened to "lex.".

Is “lex” a common word?

“Lex” is an uncommon word in modern English.

How many meanings does “lex” have?

“Lex” has 2 distinct senses listed in this dictionary. The most common is: a law, especially one from ancient Roman legal tradition.

Featured In

Definitions: FreeDict original editorial