{"by":"aappleby","descendants":12,"id":36623762,"kids":[36633193,36639252,36644367,36642183,36641767,36641241,36643834],"score":96,"text":"Howdy HN, as part of my ongoing programming language experiments I&#x27;ve ended up creating my own C++20 lexing and parsing library of sorts.<p>Matcheroni is an alternative to parser generators and regular expressions that uses trees of C++ templates to implement highly customizable lexers and parsers that have minimal impact on build times or binary sizes, while still remaining comparable in performance to Boost regular expressions.<p>The repo includes two example projects - a simple regex parser in ~300 heavily documented lines of code, and a much larger but not quite finished C99 lexer and parser.<p>All feedback appreciated!","time":1688680972,"title":"Show HN: Matcheroni, a tiny C++20 header library for building lexers/parsers","type":"story","url":"https://github.com/aappleby/Matcheroni"}