A random C++ monorepo.
Files
README.md

randomssg #

  • Originally planned to be a C++ rewrite of the Rust SSG I had that was not working, but I decided now it's a monorepo of random C++ stuff. The name sticks though, as it's quite painful to go change each and every mention of randomssg.

Included "libraries" #

pscombi #

[!WARN] Technically functioning, but using this feels very cursed.

  • Combine your parsers!
  • I should have learned Haskell...
  • Checklist:
      • Scratchpad for Sequence parser.
      • So, I forced to provide a different base-case parser.
      • That frees them from one common left-recursive skill-issue, but doesn't save from all.
      • Case: primary ::= number | "(" expr ")"
        • More precisely, a struct-for-Rec nested inside another struct-for-Rec.
      • At this point, we can parse LL(k) grammar now?
      • When OutputType is UnknownType, a lot of the parsers assume the OutputIter's type is the same as that of the input range's elements. Which is not always true, especially as we move on to add transformers.
      • We'll have to determine the output type at match call site.
      • So, we need to change OutputType inside each parser to something like:
      template <typename InputType>
      using OutputType = /* some definition based on InputType, or InvalidType (we'll rename UnknownType to). */;
      
      • Technically not a parser...
        • Gonna be helpful to deal with left/right associativity.
        • Left fold is simple(r). How would I right-fold?
        • All constituent parsers must only output 1 value.