Using Spirit X3 to Write Parsers
summary
Describes building a working Boost.Spirit X3 parser library that targets parsing only, uses C++14 internals (ADL tricks, faster compile and run times) and demonstrates a full JSON parser built with recursive variants, maps and arrays, a whitespace skipper, and minimal semantic actions for Unicode escapes. Shows attribute propagation into std::string, pair and map types, notes V2 performance and recursive-variant issues and points to benchmarks (Kiara Labs) while confirming the X3-based parser compiles and runs successfully.
AI-written summary · about
chapters (29)
- 0:00Introduction
- 1:00Why X3
- 2:08Concepts
- 2:43Ad hoc parsing
- 3:45Peg grammar for email
- 5:40What are parsers
- 8:00Grammars
- 9:00Parsers
- 9:18X3 parse API
- 9:53Types of parses
- 10:35Character partials
- 11:16Combining parsers
- 12:25Sequence operators
- 13:26Optional operators
- 14:35And predicate
- 16:45Expectation
- 18:34Lists
- 19:58Input String Example
- 21:23Rules
- 27:19Attributes
- 27:57Synthesis
- 29:25Parser
- 30:44Cosmic Pizza
- 31:06Questions
- 32:55Attribute parsing
- 37:08Example
- 44:53Grammar
- 51:04Semantic Actions
- 53:30Parse
related talks
01h 48mBoost.Parser (Part 2 of 2) - A Parser Combinator Library for C++
01h 27mBoost.Parser (Part 1 of 2) - A Parser Combinator Library for C++
16mSession Preview - Interview With – Zach Laine
01h 18mExpressive Compile-Time Parsers in C++
01h 01mExpressive Compile Time Parsers
29mMy Little Parser: Tooling is Magic
58mParsing in C# from first principles
53m“Parsing C++”
