Displaying 4 results from an estimated 4 matches for "llvm_regex_t".
Did you mean:
llvm_regex
2009 Aug 25
0
[LLVMdev] Regular Expression lib support
...it to work.
Also the OpenBSD implementation has some extensions (see docs/regex.7),
if they are useful those can be added to the Regex class also.
A summary of changes from OpenBSD version:
- rename functions and types to avoid clashes with system one:
regcomp->llvm_regcomp, ..., regex_t -> llvm_regex_t, regoff_t ->
llvm_regoff_t, BAD -> REGEX_BAD ...
- include strlcpy.c (llvm_strlcpy), a configure check could be added to
use system's one, but the function is so simple I just unconditionally
always use it
- memcpy -> memmove (parameters may overlap, BSD memcpy allows that but
POSIX...
2009 Aug 24
3
[LLVMdev] Regular Expression lib support
On Aug 23, 2009, at 11:59 PM, Török Edwin wrote:
> If LLVM is going to have an integrated regex library I suggest using
> it
> regardless if the platform has one.
> The LLVM integrated regex library will provide consistent behaviour
> and
> execution time, the system one will not.
Hi Edwin,
Can you propose the openbsd implementation as a patch to lib/support?
-Chris
2009 Aug 25
6
[LLVMdev] Regular Expression lib support
...g, SmallVectorImpl<StringRef> *Matches,
bool AllowBeginOfLine = true, bool AllowEndOfLine = true);
> + bool match_sub(const char *string, llvm_regmatch_t pmatch[],
> + unsigned nmatch, bool notbol=false, bool noteol=false);
> + private:
> + llvm_regex_t preg;
> + };
> +}
> diff --git a/include/llvm/Support/regex.h b/include/llvm/Support/regex.h
This won't work on Windows as stands (Regex.h == regex.h), but I think we should
just keep regex.h private which solves the problem (still nice to rename it to
avoid confusion, llvm_regex.h...
2009 Aug 25
0
[LLVMdev] Regular Expression lib support
...bool AllowBeginOfLine = true, bool AllowEndOfLine = true);
>
>
>> + bool match_sub(const char *string, llvm_regmatch_t pmatch[],
>> + unsigned nmatch, bool notbol=false, bool noteol=false);
>>
>
>
>
>> + private:
>> + llvm_regex_t preg;
>> + };
>> +}
>>
>
>
>> diff --git a/include/llvm/Support/regex.h b/include/llvm/Support/regex.h
>>
>
> This won't work on Windows as stands (Regex.h == regex.h), but I think we should
> just keep regex.h private which solves the...