[Development] Regular expression libraries for QRegExp (what about "tre")

lars.knoll at nokia.com lars.knoll at nokia.com
Mon Dec 5 10:26:37 CET 2011


The benchmark numbers mentioned on
http://public.kitware.com/pipermail/cmake-developers/2011-November/002547.h
tml
is something we shouldn't simply ignore.

It sounds like Re2 is worth looking into. Do we have any information about
size and performance of that one?

In general we will need to allow for using different regexp engines anyway
(to allow QRegExp to continue working). That means we need to make the API
we have work with both QRegExp and whatever we now use as a replacement.

That would at the same time imply that anybody can add any regexp engine
as an add-on to Qt, and we should be careful about the one we put into
QtCore. I believe the most important points for inclusion into QtCore are
speed, small footprint (RAM and ROM) and being reentrant. I am less
worried about a maximal feature set, esp given that we can simply add
other regexp engines as add-ons.

Cheers,
Lars





On 12/3/11 9:00 PM, "ext Thiago Macieira" <thiago.macieira at intel.com>
wrote:

>On Saturday, 3 de December de 2011 23.39.57, Francesco Riosa wrote:
>> reading these two blogs:
>> 
>>http://blog.rburchell.com/2011/12/why-i-avoid-qregexp-in-qt-4-and-so.html
>> http://blogs.kde.org/node/4510 (Regexp library benchmarks...)
>> 
>> I've learned of the TRE library (http://laurikari.net/tre/about/) it
>> has interesting functionality like fuzzy matching and seem to have all
>> what you need except for named matches (?name: bla bla)
>> 
>> I've tryed to compile it and it's very small.
>> 
>> Licensed "As is"
>> 
>> what does it miss for be elected in qt5 inclusion?
>
>Two things:
>
>1) a fully-compatible syntax to PCRE or JS, with equal or better
>performance 
>than existing engines
>
>2) a healthy developer community behind it to ensure that it will
>continue to 
>be supported
>
>-- 
>Thiago Macieira - thiago.macieira (AT) intel.com
>  Software Architect - Intel Open Source Technology Center
>     Intel Sweden AB - Registration Number: 556189-6027
>     Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden
>_______________________________________________
>Development mailing list
>Development at qt-project.org
>http://lists.qt-project.org/mailman/listinfo/development




More information about the Development mailing list