search
Log In
0 votes
51 views

 The UNIX shell command sh uses the operators in Fig. $3.9$ in filename expressions to describe sets of file names. For example, the filename expression *.o matches all filenames ending in. o; sort 1. ? matches all filenames of the form sort. c, where c is any character. Show how sh filename expressions can be replaced by equivalent regular expressions using only the basic union, concatenation, and closure operators.

in Compiler Design 51 views

Please log in or register to answer this question.

Related questions

0 votes
0 answers
1
42 views
SQL allows a rudimentary form of patterns in which two characters have special meaning: underscore (_) stands for any one character and percent-sign (%) stands for any string of $0$ or more characters. In addition, the programmer may define any character, say ... meaning. Show how to express any SQL pattern as a regular expression, given that we know which character is the escape character.
asked Aug 5, 2019 in Compiler Design Lakshman Patel RJIT 42 views
0 votes
0 answers
2
0 votes
0 answers
3
30 views
The regular expression $r\{m, n\}$ matches from $m$ to $n$ occurrences of the pattern $r$. For example, $a [1, 5]$ matches a string of one to five a's. Show that for every regular expression containing repetition operators of this form, there is an equivalent regular expression without repetition operators.
asked Aug 5, 2019 in Compiler Design Lakshman Patel RJIT 30 views
0 votes
0 answers
4
95 views
In Lex, a complemented character class represents any character except the ones listed in the character class. We denote a complemented class by using ^ as the first character; this symbol (caret) is not itself part of the class being ... . Show that for every regular expression with complemented character classes, there is an equivalent regular expression without complemented character classes.
asked Aug 5, 2019 in Compiler Design Lakshman Patel RJIT 95 views
...