hws/hw05.tex
changeset 322 698ed1c96cd0
parent 294 c29853b672fb
child 359 db106e5b7c4d
equal deleted inserted replaced
321:c5850f8f3f5e 322:698ed1c96cd0
    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}