This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Re: pregexp: POSIX classes error
- From: Khairul Azhar <kazar1my at yahoo dot co dot uk>
- To: kawa at sources dot redhat dot com
- Date: Fri, 27 Sep 2002 02:41:26 +0100 (BST)
- Subject: Re: pregexp: POSIX classes error
--- kazar1my@yahoo.co.uk wrote:
> Has anyone got POSIX classes in the pregexp package to work correctly
> under Kawa?
Found it (I hope)! The following patch should do it. Apparently, it has
something to do with how Kawa handles keywords (though I'm not sure): -
*** pregexp.scm Fri Mar 22 06:43:14 2002
--- pregexp-kawa.scm Fri Sep 27 07:52:04 2002
***************
*** 170,177 ****
(not (char=? (string-ref s (+ i 1)) #\])))
(pregexp-error 'pregexp-read-posix-char-class)
(let ((posix-class
! (string->symbol
! (list->string (pregexp-reverse!
r)))))
(list (if neg? (list ':neg-char posix-class)
posix-class)
(+ i 2)))))
--- 170,178 ----
(not (char=? (string-ref s (+ i 1)) #\])))
(pregexp-error 'pregexp-read-posix-char-class)
(let ((posix-class
! (string->keyword
! (list->string
! (cdr (pregexp-reverse! r))))))
(list (if neg? (list ':neg-char posix-class)
posix-class)
(+ i 2)))))
Note that the above patch has not been tested fully, though
pregexp-test.scm completes all of the tests. Use at your own risk.
--- Marco Vezzoli <marco.vezzoli@st.com> wrote:
> I didn't used that package, but I suggest you to try the gnu.regexp, the
> jakarta.oro or sun's jdk 1.4 regexp packages and write a kawa
> interface:
IMHO, Scheme is a more powerful language than Java could ever be. Besides,
I'm still battling to get my first Kawa-Java program running. A way to
define constructors in Kawa would be helpful (*hint* *hint*).
=====
Khairul Azhar
__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com