[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: OT: regular expression question



>>>>> "Rogerio" == Rogerio Brito <rbrito@iname.com> writes:

    Rogerio> On Dec 08 2000, Hubert Chan wrote:
    >> Oops.  There should be a "| \epsilon" at the end of that (where \epsilon
    >> is the empty string) if you count the empty string as a palindrome.  If
    >> not, then you should add "| aa | bb".

    Rogerio> 	No, it's not the same thing. The former language generated by
    Rogerio> the grammar with the production S -> \varepsilon has the empty
    Rogerio> string, while, if you substitute it by S -> aa | bb, then your new
    Rogerio> language does not contain \varepsilon.

Um, I never said that they were the same thing.  In fact, I specifically said
that they different.  If you read my post again (in fact, the very part that
you quoted), you will see that I said that which rule you add depends on
whether or not you count the empty string as a palindrome.

Hubert

-- 
____     |     -----------------------------------------------------------
|  /   --+--
| /   ___|___    Hubert Chan <hackerhue@crosswinds.net>
| \   | _|_ |
|__|  |__|__|    GCS/M d- s:- a-- C++ UL+(++++) P++ L++ E++ W++ N++ o?
|        |       K? w--- O++ M- V- PS-- PE+++ Y+ PGP+ t+ 5 X R- tv+ b+
|      / | \     DI++++ D G e++ h! !r !y
|     /  |  \
|        |     <><------------------ http://www.crosswinds.net/~hackerhue/

PGP/GnuPG fingerprint: 6CC5 822D 2E55 494C 81DD  6F2C 6518 54DF 71FD A37F
Key can be found at http://www.crosswinds.net/~hackerhue/hackerhue.asc



Reply to: