[LLVMdev] Regular Expression lib support

Daniel Dunbar daniel at zuster.org
Sun Aug 23 17:32:55 PDT 2009


On Sun, Aug 23, 2009 at 3:29 PM, Kenneth Uildriks<kennethuil at gmail.com> wrote:
> On Sun, Aug 23, 2009 at 4:56 PM, Daniel Dunbar<daniel at zuster.org> wrote:
>> We would like to have access to some kind of regular expression
>> library inside LLVM. For example, we need this to extend the FileCheck
>> test case checking tool to support regular expressions.
>>
>> There are three obvious options:
>>  1. Roll our own library. Multiple unnamed individuals may even
>> already have implementations lying around! :)
>>  2. Use POSIX regcomp facilities. This implies importing some
>> implementation of this interface, e.g., Windows. On Linux, BSD, etc.
>> we would try to use the platform version if available (and non-buggy).
>>
>>  3. Import a more heavy weight library such as PCRE, and use it universally.
>
>
> Personally, I'm a big fan of the Boost libraries.  They've got a regex
> library, and a full-blown parser library (which I am using in my
> front-end).  It's definitely heavier than POSIX, but it's portable,
> well-tested, and loaded with features.

This is too heavy, and we don't need the extra features, and regexec
is well tested and much more standard. Unless there is an overwhelming
agreement to add another option, I'd like to keep the discussion to
the obvious choices. That is, I need to be convinced *not* to use #2,
before I get derailed into discussing which form of #3 to take.

 - Daniel




More information about the llvm-dev mailing list