[plt-scheme] Possible bug in regexp?

From: Jay McCarthy (jay.mccarthy at gmail.com)
Date: Tue Apr 27 10:48:35 EDT 2010

I just pushed a fix + new tests.

Jay

On Tue, Apr 27, 2010 at 7:09 AM, Jay McCarthy <jay.mccarthy at gmail.com> wrote:
> So the real error is that the pattern says to disallow all characters
> between 0 and #?
>
> I will fix that when I get in.
>
> Jay
>
> On Tue, Apr 27, 2010 at 7:07 AM, Matthew Flatt <mflatt at cs.utah.edu> wrote:
>> At Tue, 27 Apr 2010 08:52:53 -0400, "Todd O'Bryan" wrote:
>>>
>>> (regexp-match?
>>>        #rx"^\"([^\"#\u0000]| |#\return#\newline|#\tab|\\\\\")*\"$"
>>>        "\")!\"")
>>>
>>> succeeds, but
>>
>> I think that was meant to be
>>
>>  (regexp-match?
>>        #rx"^\"([^\"\u0000]| |\r\n|\t|\\\\\")*\"$"
>>        "\")!\"")
>>
>> That is, the syntax for character escapes in a string is different from
>> the syntax of character literals.
>>
>>> (regexp-match?
>>>        #rx"^\"([^\"#\u0000-#\u0000]| |#\return#\newline|#\tab|\\\\\")*\"$"
>>>        "\")!\"")
>>
>> The expression
>>
>>  (regexp-match?
>>        #rx"^\"([^\"\u0000-\u0000]| |\r\n|\t|\\\\\")*\"$"
>>        "\")!\"")
>>
>> produces #t.
>>
>>> (regexp-match?
>>>        #rx"^\"([^\"#\u0000-#\u0001]| |#\return#\newline|#\tab|\\\\\")*\"$"
>>>        "\")!\"")
>>
>> The expression
>>
>>  (regexp-match?
>>        #rx"^\"([^\"\u0000-\u0001]| |\r\n|\t|\\\\\")*\"$"
>>        "\")!\"")
>>
>> also produces #t.
>>
>> _________________________________________________
>>  For list-related administrative tasks:
>>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>>
>
>
>
> --
> Jay McCarthy <jay at cs.byu.edu>
> Assistant Professor / Brigham Young University
> http://teammccarthy.org/jay
>
> "The glory of God is Intelligence" - D&C 93
>



-- 
Jay McCarthy <jay at cs.byu.edu>
Assistant Professor / Brigham Young University
http://teammccarthy.org/jay

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


Posted on the users mailing list.