Differences
This shows you the differences between two versions of the page.
|
lfa:languages [2017/10/11 12:51] pdmatei created |
lfa:languages [2018/07/20 12:00] (current) pdmatei [Computing L(e) - a semantics for regular expressions] |
||
|---|---|---|---|
| Line 95: | Line 95: | ||
| * can we afford to define any kind of programming language, without affecting the parsing process? | * can we afford to define any kind of programming language, without affecting the parsing process? | ||
| * can we build parsers for natural language? | * can we build parsers for natural language? | ||
| - | * what is the relationship between Languages and Complexity Theory? | + | * what is the relationship between |
| + | Languages and Complexity Theory? | ||
| | | ||
| We shall address most of these questions throughout the lecture. But for now, we return to regular expressions. | We shall address most of these questions throughout the lecture. But for now, we return to regular expressions. | ||
| Line 110: | Line 111: | ||
| * **kleene-star**: the language $math[A*] is the set $math[\{w \in\Sigma^* \mid w = w_1\ldots w_n, n\geq 0, w_1, \ldots, w_n \in A\}] of zero or more concatenations of any word from $math[A]. | * **kleene-star**: the language $math[A*] is the set $math[\{w \in\Sigma^* \mid w = w_1\ldots w_n, n\geq 0, w_1, \ldots, w_n \in A\}] of zero or more concatenations of any word from $math[A]. | ||
| - | Next, we can define rules for determining the language accepted by a regular expression. | + | Next, we can define rules for determining the language generated by a regular expression. |
| - | * the language accepted by the regular expression $math[\emptyset] is simply the empty language $math[\emptyset]. | + | * the language generated by the regular expression $math[\emptyset] is simply the empty language $math[\emptyset]. |
| - | * the language accepted by the regular expression $math[c], for $math[c\in\Sigma] is $math[L(c)=\{c\}] (a single-word set). | + | * the language generated by the regular expression $math[c], for $math[c\in\Sigma] is $math[L(c)=\{c\}] (a single-word set). |
| * $math[L(e*)] is the language $math[(L(e))*], i.e. the **kleene star** of the language $math[L(e)]. | * $math[L(e*)] is the language $math[(L(e))*], i.e. the **kleene star** of the language $math[L(e)]. | ||
| * $math[L(ee')] is $math[L(e)L(e')] | * $math[L(ee')] is $math[L(e)L(e')] | ||
| Line 118: | Line 119: | ||
| Returning to our previous example, the language $math[L((A\cup B)(a\cup b)*(0 \cup 1)*)] is: | Returning to our previous example, the language $math[L((A\cup B)(a\cup b)*(0 \cup 1)*)] is: | ||
| - | * $math[L(A\cup B) L((a\cup b)*) L((0 \cup 1)*))], i.e. | + | * $ |
| + | math[L(A\cup B) L((a\cup b)*) L((0 \cup 1)*))], i.e. | ||
| * $math[L(A\cup B) L((a\cup b))* L((0 \cup 1))*)], i.e. | * $math[L(A\cup B) L((a\cup b))* L((0 \cup 1))*)], i.e. | ||
| * $math[(L(A)\cup L(B)) (L(a) \cup L(b))* (L(0) \cup L(1))*], i.e. | * $math[(L(A)\cup L(B)) (L(a) \cup L(b))* (L(0) \cup L(1))*], i.e. | ||