A lexicon may refer to any of the following:
1. In general, a lexicon is a group of words that make up a language. For example, each of the words in this sentence are a few of the words that make up the English lexicon. A lexicon can also be a branch of knowledge that stores all known words of a particular subject. For example, the computer dictionary is considered a lexicon of all computer-related terms.
2. When referring to computers or programming, lexicon is the group of words that are used to create a programming language. For example, for, foreach, do, if, and while are a few examples of words found in many programming languages.