[LLVMdev] Regular Expression lib support

OvermindDL1 overminddl1 at gmail.com
Sun Aug 23 22:21:28 PDT 2009


On Sun, Aug 23, 2009 at 10:58 PM, Chris Lattner<clattner at apple.com> wrote:
>
> On Aug 23, 2009, at 9:50 PM, OvermindDL1 wrote:
>
>> On Sun, Aug 23, 2009 at 10:20 PM, Chris Lattner<clattner at apple.com> wrote:
>>>
>>> On Aug 23, 2009, at 9:11 PM, OvermindDL1 wrote:
>>>>>
>>>>> Again, forget boost regex. :)
>>>>
>>>> What about std::regex?
>>>
>>> No, we have to build with c++'98 compilers.  I think you're missing the
>>> point here.  We care about code size in llvm, and the best code size you
>>> can
>>> get is to link to the one already in your address space because it's part
>>> of
>>> libc.
>>
>> There are multiple ones that have been created that fullfill
>> std::regex that work just fine on C++98, such as boost::regex and
>> dinkumware's and I know there is at least one other.
>
> I think you're missing the whole "we value small code size more than speed
> of matching" thing.

I gathered that, hence why I have been pushing spirit, it makes for
very tight compiled code while working everywhere and being easy to
use (while being fast, but that is a side effect in this case).  For
just plain matching you just call parse(iterbegin, iterend,
toMatchToRules).  You can even just feed it the file iterators
directly without needing to stringize it first.




More information about the llvm-dev mailing list