scsh-users
[Top] [All Lists]

Bug in regexp->posix-string

To: scsh-bugs@zurich.ai.mit.edu
Subject: Bug in regexp->posix-string
From: Michel Schinz <Michel.Schinz@epfl.ch>
Date: 04 Sep 2000 16:14:48 +0200
Sender: schinz@lamppc6.epfl.ch
Hi!

There seems to be a bug in regexp->posix-string in 0.5.2: when
generating the posix string for a charset regexp including both the
"-" and the "]" characters, the "-" character is output as the second
character in the range, while it should be the last. The following
session exhibits this behaviour:

----------------------------------------------------------------------
Scsh 0.5.2
> (regexp->posix-string (rx ("a-]")))
; 4 values
"[]-a]"
1
0
'#()
> (posix-string->regexp "[]-a]")

Error: Illegal - in [...] regexp
       "[]-a]"
       2
1> 
> (regexp-search (rx ("a-]")) "little test with a")

Error: 11
       "invalid character range"
       #{Procedure 8870 compile-posix-re->c-struct}
       "[]-a]"
       #t
1> 
----------------------------------------------------------------------
--
Michel.

<Prev in Thread] Current Thread [Next in Thread>
  • Bug in regexp->posix-string, Michel Schinz <=