## 9.4.Values of Regular expressions

Expressions in any algebra have values of a certain type.

For arithmetic expressions, values are integers, reals or whatever type of numbers with which we are working.

5 + 8 / 16 * 7 + 3 =

For regular expressions, the value of each expression is pattern consisting of a set of strings often called a language.

The language denoted by regular expressions E will be referred to as L(E), or the language of E. The languages of the atomic operands are defined as follows:

```1.   IF x is any character, then the regular expres­
sion x stands for the  language  {x};  that  is
L(x) = { x }.  Note that this language is a set
that contains one string,  the  string  is  the
length 1, and the first position of that string
has the character x
2.   L() = {  }.  The special symbol  as  a  regular
expression denotes the set whose only string is
the empty string, or string of length 0.
3.   L() = {  }.  The special symbol  as  a  regular
expression denotes the empty set of strings.
```

Note that we do not define a value from an atomic operand that is a variable. Such an operand only takes an value when we replace the variable by a concrete expression, and its value is whatever value that expression has.

Created by unroff & hp-tools. © by Hans-Peter Bischof. All Rights Reserved (1998).

Last modified: 27/July/98 (12:14)