lexy - A parser DSL library

Jonathan Müller

⏱ 20 mins
intermediate
advanced
14:25-14:45, Friday, 19th April 2024
lexy is a C++ parsing library; it's essentially syntax sugar for a handwritten recursive descent parser, where you have full control over alternatives and backtracking. It supports Unicode as well as binary inputs, has good error messages on invalid input with automatic error recovery, and is able to store the result in arbitrary data structures or as a lossless parse tree. This talk gives an overview on how to use lexy, how it works, and why it is designed the way it is. I'll also share various template meta programming tricks, talk about designing embedded DSLs in C++, and discuss shortcomings of C++'s iterator model and benefits of sender/receiver style continuations.
🏷 parsing
🏷 DSL
🏷 template meta programming

Jonathan Müller

Jonathan is a library developer at think-cell. In his spare time, he works on various C++ open source libraries for memory allocation, cache-friendly containers, or parsing. He also blogs at foonathan.net and is a member of the C++ standardization committee.