Brainplus:
A user experience
Braden Ganetsky
C++Now 2024 Lightning Talk
## Goals of this talk * User experience * Innovative API
## Brainplus * Parser combinators * Expression templates in C++20 (empty types) * Fully capable at compile-time * Sounds like a famous language?
Epsilon
tok3n
Brainplus
Single "A"
tok3n
Brainplus
Literal "ABC"
tok3n
Brainplus
Version string
tok3n
Version string
Brainplus
Version string
Brainplus
Modifiers in
tok3n
## How many ways can we use `+`? * Unary `+a` * Binary `a + b` * Prefix increment `++a` * Postfix increment `a++` * Anything else? (without `+=`) * `a.operator++()` (stay with me)
## How can we inject template parameters? * `a.operator++
()` * `a.operator++
()` * Overload set, therefore both can exist * Necessary because expression templates
Modifiers in
Brainplus
Version string v2
Recursion in
tok3n
Recursion in Brainplus
Recursion in Brainplus
Recursion in Brainplus
Version string v3
## Next up * `tok3n` to Brainplus converter * Propose to Boost
Thank you!
Braden Ganetsky
braden@ganets.ky
GitHub @k3DW