equal
deleted
inserted
replaced
35 r_1 \cdot r_2 \;|\; |
35 r_1 \cdot r_2 \;|\; |
36 r^* \;|\; |
36 r^* \;|\; |
37 \sim r$ |
37 \sim r$ |
38 \end{center} |
38 \end{center} |
39 |
39 |
40 \item Assume the delimiters for comments are \texttt{$\slash$*} |
40 %\item Assume the delimiters for comments are \texttt{$\slash$*} |
41 and \texttt{*$\slash$}. Give a regular expression that can |
41 %and \texttt{*$\slash$}. Give a regular expression that can |
42 recognise comments of the form |
42 %recognise comments of the form |
43 |
43 % |
44 \begin{center} |
44 %\begin{center} |
45 \texttt{$\slash$*~\ldots{}~*$\slash$} |
45 %\texttt{$\slash$*~\ldots{}~*$\slash$} |
46 \end{center} |
46 %\end{center} |
47 |
47 % |
48 where the three dots stand for arbitrary characters, but not |
48 %where the three dots stand for arbitrary characters, but not |
49 comment delimiters. |
49 %comment delimiters. |
50 |
50 |
51 \item Define the following regular expressions |
51 \item Define the following regular expressions |
52 |
52 |
53 \begin{center} |
53 \begin{center} |
54 \begin{tabular}{ll} |
54 \begin{tabular}{ll} |