Regex problem with JPython 1.1b4 and Java 1.2.1

Magnus L. Hetland mlh at vier.idi.ntnu.no
Thu Dec 30 17:59:15 EST 1999


Hi!

I am trying to use the lates version of JNumPy, and to do that, I had
to use java 1.2 (in my case, 1.2.1 for solaris). With that, I suddenly
had a problem pre-compiling the pylib.jar archive. After trying to run
some of the statements in the file it stopped at (pyclbr.py) I found
this to be the culprit:

is_from = re.compile('^from[ \t]+(?P<module>'+id+'([ \t]*\\.[ \t]*'+id+')*)[ \t]
+import[ \t]+(?P<imp>[^#;]+)')

JPython just hangs when I try to run it - I guess it might have to do
with the ORO package which was probably not made for 1.2. (I have seen
1.2 crash or hang with lots of old java code - for instance the GUI
installator for JPython...)

When I removed the newline, it seemed to work.

Hm - no, er... That was from my CPython libs (1.5.2) - I only have
pylib152d.jar... Oh, well - the point is the same, I guess. The first
regex there is still a multiline string, (just much bigger) and it
still makes JPython hang. And there was no problem when I used Java
1.1.7B.

So - my (preliminary) bug report or request for help or something
concludes with that multiline regexps (or something like that) don't
work with the following (no wonder with the single-quoted one, of
course, but - I should have gotten an exception or something):

Java: Solaris VM (build Solaris_JDK_1.2.1_03, native threads, sunwjit)
JPython: JPython 1.1beta4 on java1.2.1 (JIT: sunwjit)

My guess is that the OROMatcher somehow contains obsolete code. Does
anyone know anything about this? (I See they have PerlTools 1.2 out,
specifically supporting Java 1.2... Maybe I'll try that...)

--

  Magnus
  Lie
  Hetland



More information about the Python-list mailing list