THIS REPO IS ALL SPOILERS.
For puzzle descriptions, and to play for yourself, see https://adventofcode.com/, and consider donating to AoC++. I publish my answers because folks who have also solved the puzzles like to discuss different approaches.
I'll often use a new framework, a new process, etc. on these puzzles. I tend to use a lot of PEGjs grammars, because I find those fun. That project is currently undergoing some changes, and you'll note that I'm using an odd branch of the code that has an undocumented feature. Rules that have multiple elements on the right hand side can return one or more results without needing a code block by prefixing those elements with @
. For example:
lines = (@line "\n")*
will return an array of the lines without newlines. This comes up so often for me that it's worth using an odd fork to reduce the amount of code needed.