The rules for forming regular expressions begin by specifying the overall set of characters allowed to occur in tokens. This set, historically denoted by the greek letter , is called the alphabet of your language. Any set of strings constructed of characters from the alphabet is called a language over . Regular expressions are used to denote the particular language over we are interested in. Each letter in is a regular expression.
Every regular expression represents a language over the alphabet .
The symbol represents the singleton set of the empty string. Each letter in represents the singleton set of the one-character string corresponding to that letter. That is, it is the union of those two languages. Let's look at a few examples of regular expression for particular token classes. It is this information that is passed to the parser.