Compile time regular expression in C++
11–20 of 30 posts
Re: Compile time regular expression in C++
#12Re: Compile time regular expression in C++
#13Re: Compile time regular expression in C++
#14This has been available in Lisp since at least 2004. https://github.com/edicl/cl-ppcre/
Re: Compile time regular expression in C++
#15This has been available in Lisp since at least 2004. https://github.com/edicl/cl-ppcre/
Re: Compile time regular expression in C++
#16This has been available in Lisp since at least 2004. https://github.com/edicl/cl-ppcre/
C++ has had run-time regular expressions in its standard library since C++11, but this is about compile-time regular expressions
> CL-PPCRE uses compiler macros to pre-compile scanners at load time if possible. This happens if the compiler can determine that the regular expression (no matter if it's a string or an S-expression) is constant at compile time and is intended to save the time for creating scanners at execution time (probably creating the same scanner over and over in a loop).
Re: Compile time regular expression in C++
#17--
0: https://github.com/alexnask/ctregex.zig
1: I think the difference between C++ template language and Zig comptime is that Zig's comptime is almost equal as Zig's regular language, whereas the experience of programming C++ templates almost feels like learning a separate, equally complex language.
Re: Compile time regular expression in C++
#18I'd love for someone to add this to rebar[1] so that we can get a good sense of how well it does against other general purpose regex engines. It will be a little tricky to add (since the build step will require emitting a C++ program and compiling it), but it should be possible. [1]: https://github.com/BurntSushi/rebar
Re: Compile time regular expression in C++
#19Earlier quoted context omitted.
C++ has had run-time regular expressions in its standard library since C++11, but this is about compile-time regular expressions
I've never used cl-ppcre myself, but its docs[1] claim that it provides compile-time regexes: > CL-PPCRE uses compiler macros to pre-compile scanners at load time if possible. This happens if the compiler can determine that the regular expression (no matter if it's a string or an S-expression) is constant at compile time and is intended to save the time for creating scanners at execution time (probably creating the s…
Re: Compile time regular expression in C++
#20https://www.boost.org/doc/libs/1_83_0/doc/html/xpressive.htm...
A performance comparison would be interesting.