On 20/12/2007, <b class="gmail_sendername">mats cronqvist</b> <<a href="mailto:firstname.lastname@example.org">email@example.com</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Wed, 2007-12-19 at 18:14 +0000, Tomasz Blachowicz wrote:<br>><br>> If there are any other decent implementations of regexp available<br>> please let me know.<br><br> rumour has it that robert virding is working on a new erlang
<br>implementation; couldn't find any code by googling though.</blockquote><div><br>Yes, I do have one that works but I haven't released it yet. Some info:<br><br>- It is written entirely in Erlang so it will be always available.
<br>- It supports POSIX regexps and can capture subexpressions.<br>- It is a true NFA implementation and will never blow up irrespective of the regexp. Most packages are unsafe for pathological cases, read Russ Cox <a href="http://swtch.com/~rsc/regexp/">
http://swtch.com/~rsc/regexp/</a><br>- It is probably not as fast as C implementations, but see above.<br>- It has a better parser ADT then the existing one.<br>- Having the ADT available in Erlang can be a big win.<br>- As it is written in Erlang it will nevre lock the emulator.
<br><br>All that really needs to be done is to clean up the interface slightly. I will release soon so people who want can test it. I have not been able to compare speed with other implementation like PCRE as I only have access to a toy environment, pure Windows. (see above features)
<br><br>What I really think should be done is to split the work and have the parser/compiler written in Erlang while the actual execution code written in C. Try to get the best of both worlds. One benefit of this would be that it would be then be easier to write other tools/apps which use regexps but don't want to do just standard matching with them, for example leex or other scanner/parser tools.