~/talk

Expressive Compile-time Parsers in C++

Talkat CppCon 2023 · on Monday, 2023-10-02· at 11:00· Cottonwood 2/3, 6700 North Gaylord Rockies Boulevard· [typescript]
name:Alon Wolf
links:none on file
slides:none on file

Survey of compile-time parsing libraries from C++11→23, showing concrete code, benchmarks and working examples: Boost.MetaPars, Lexi, CT(regular expressions), ctpg and a macro-rules emulator, plus a homegrown parser-combinator. Demonstrations include compile-time JSON/AST and a TypeScript-like struct generator, assembly comparison proving zero runtime overhead, regex construction that outperforms std::regex, and compile-time cost measurements (parsing 1,000 structs adds ~100–200 ms, while the custom DSL path costs 14 seconds for 1000 structs).

AI-written summary · about

  1. 0:00Introduction
  2. 1:07Talk structure and goals
  3. 3:35Parsers and parsing techniques
  4. 7:28Compile-time parsing importance
  5. 8:11Boost.Metaparse
  6. 12:23Lexi: C++17 parsers
  7. 15:10CTRE: compile-time regex
  8. 17:42CTPG: LR1 generator
  9. 20:32Macro Rules: Rust-like DSL
  10. 24:47Custom parser combinator demo
  11. 26:14Reflection and parsing integration
  12. 31:30Nested member access
  13. 36:37Advanced syntax operators
  14. 41:17Creating structs
  15. 43:46When to use compile-time parsing
  16. 45:11Choosing a parsing library
  17. 45:52Handling errors
  18. 47:16Performance benchmarks
  19. 50:05Future of compile-time parsing
  20. 51:11Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.