[IronPython] differences in IronPython/CPython regular expressions?

Tomas Matousek Tomas.Matousek at microsoft.com
Thu Jun 2 20:00:25 CEST 2011


BTW, depending on how CPython regex syntax and semantics compares to Oniguruma (Ruby's Regex engine) it might be useful to look at the implementation for IronRuby (http://github.com/IronLanguages/main/blob/master/Languages/Ruby/Ruby/Builtins/RegexpTransformer.cs) 
I implemented Oniguruma compatible parser that translates 99% of the features to .NET. There are a few missing features that can be implemented relatively easily and then there are some Unicode features that would be quite difficult to do since .NET Regex doesn't support Unicode so much.

In any case, if you found you need to fix the IronPython translator and the fix would require precise understanding of the syntax it might be worth it to reuse the code from IronRuby.

Tomas

-----Original Message-----
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Jeff Hardy
Sent: Thursday, June 02, 2011 9:46 AM
To: Discussion of IronPython
Subject: Re: [IronPython] differences in IronPython/CPython regular expressions?

On Thu, Jun 2, 2011 at 9:41 AM, Bill Janssen <janssen at parc.com> wrote:
> Jeff Hardy <jdhardy at gmail.com> wrote:
>
>> The fact that it works on CPython fairly fast indicates a bug 
>> somewhere, I'm just not sure if it's IronPython or Mono.
>
> I just tried it with real MS .NET, on a 64-bit Windows 7 machine with 
> a new download of IronPython 2.7.  On that platform, it core-dumps 
> (well, ipy exits with a StackOverflowException).

Any chance you could get a debugger on there and figure out where the SOE is (IronPython or .NET)? If not, I can try to take a look if you send the complete regex, but probably not until the weekend.

- Jeff
_______________________________________________
Users mailing list
Users at lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com







More information about the Ironpython-users mailing list