Boost.Parser (Part 1 of 2) - A Parser Combinator Library for C++
summary
Boost.Parser is a new Boost candidate (C++17+) that grafts Spirit 2’s ergonomics onto X3’s modernization, claiming much shorter compile times and safer diagnostics. It exposes parse / prefix_parse overloads with skipper support, uses Boost.Charon for fast numeric parsing, and implements container-aware attribute insertion so parsed sequences can be fed directly into sets, vectors or user structs. Parsers are cheap to construct (no hidden allocations), support permutation, expectation points, semantic actions, and a small set of documented collapsing rules for predictable attribute types.
AI-written summary · about
chapters (9)
- 0:00Introduction to Boost.Parser
- 1:04Why Boost.Parser exists
- 10:12Basic parser example
- 23:10Parser implementation details
- 37:39Attribute generation rules
- 58:45Out-parameter matching
- 1:09:41Semantic actions explained
- 1:21:42Semantic actions vs attributes
- 1:26:14Q&A and summary
related talks
01h 01mUsing Spirit X3 to Write Parsers
26mParser Combinators in Swift
58mParsing in C# from first principles
41mParser Combinators
52mBuilding a parser in C#, from first principles
53mUnderstanding parser combinators: a deep dive
01h 01mExpressive Compile Time Parsers
32mTime flies like an arrow; Fruit flies like a banana: Parsers for Great Good
