[plt-dev] regexp equality

From: Jay McCarthy (jay.mccarthy at gmail.com)
Date: Fri Feb 19 13:45:56 EST 2010

FWIW, I am testing the Scheme based zo-decompiler, so I just need
representation equality as produced by the reader.

On Fri, Feb 19, 2010 at 11:39 AM, Neil Van Dyke <neil at neilvandyke.org> wrote:
> Jay McCarthy wrote at 02/19/2010 01:20 PM:
>> How do I test regexps for equality?
> Comparing the write format has limited usefulness:
> (equal? (format "~S" #rx"aaa") (format "~S" #rx"aaa")) ==> #t
> (equal? (format "~S" #rx"aaa") (format "~S" #rx"bbb")) ==> #f
> (equal? (format "~S" #rx"[a]aa") (format "~S" #rx"aaa")) ==> #f
> I don't know that comparing whatever compiled automata or abstract
> representations would be good enough to prove whether or not two regexps are
> equivalent.
> --
> http://www.neilvandyke.org/

Jay McCarthy <jay at cs.byu.edu>
Assistant Professor / Brigham Young University

"The glory of God is Intelligence" - D&C 93

Posted on the dev mailing list.