Compile-Time Regular Expressions
summary
A C++20 library that parses and compiles regular expressions at compile time using constexpr/compile-time strings, producing finite automata embedded in the binary so matching requires no runtime regex parser or separate regex runtime. It implements a constexpr parser, automaton construction, capture and alternation handling, and template-argument-limit workarounds, and presents trade-offs in compile time and binary size with generated assembly and Compiler Explorer comparisons.
AI-written summary · about
chapters (9)
- 0:00Introduction
- 3:50Compile-time regex
- 11:27Regex in grammar
- 20:00Parser with compile-time regex
- 30:50Alternatives and limits
- 40:31Performance and caching
- 50:26Practical applications
- 1:00:14Summary
- 1:02:58Q&A
related talks
01h 01mExpressive Compile Time Parsers
01h 18mExpressive Compile-Time Parsers in C++
01h 00m“Using Compile-time Code Generation to build an LLVM IR Pattern Matcher”
51mRegular Expressions in C++, Present and Future
01h 00mconstexpr: Applications
01h 10m“constexpr ALL the Things!”
01h 09m“Compile-time programming and reflection in C++20 and beyond”
37mAll About Regular Expressions
