Regular Languages are the simplest family of formal languages.
Can be defined in different ways:
Regular Expression (regexp) is a string $r$ defined with the terminal alphabet $\Sigma$
containing some metasymbols
$r,s,t$ are regexp
$r=s^$ <!---->
star *
concatenation .
union $\cup$ or |
A language is regular if it is generated by a regular expression
regexp | language |
---|---|
$\varepsilon \;\text{or}\;\varnothing$ | ${\varepsilon}$ |
$a\in\Sigma$ | ${a}$ |
$s \cup t \; \text{or} \; s \mid t$ | $L_s \cup L_t$ |
$s.t \; \text{or} \; st$ | $L_s.L_t$ |
$s^*$ | ${L_s}^*$ |
#####example
The regexp $e$ that generates the language of integers, possibly signed
$e={(+\cup - \cup\varepsilon)dd}^$ $L_e={+,-,\varepsilon}{d}{d}^$
Family of regular languages or REG:
Is the collection of all regular languages.
Family of finite languages or FIN:
Is the collection of all languages of finite cardinality.