I swear to god, getting Chumsky to do my bidding has almost taken longer than writing a parser by hand. I'm not looking for operator precedence, I'm not looking for complicated rules or anything, the main part of my language is literally just S-expressions, with some top level bells and whistles.

I don't even have a working lexer yet because I wanted to use this piece of shit library which usually matches the fewest possible characters to parse significant newlines but the Padded combinator takes as much whitespace at the end as it can find, and a host of other atomics don't actually adhere to the library's lazy principle in their procedural implementation. I've had enough. I'm going to bed, and tomorrow I'm writing tickets.

Actually, I'll probably also write PRs because I actually want the fixes to exist and not just complain about the problems, but I also really want to complain before I get started on that because I spent about two weeks just on this bullshit.

  • 0
    A rand followed by a PR is more valuable that a thousand rants

    Great work!
  • 0
    @Drunkzee I fixed all my problems today by realizing that I misread the principle in the docs; Chumsky's combinators are meant to be greedy, it just doesn't try to parse all input, which makes a lot of sense because this way you can tack it onto a blocking stream such as stdin and get a REPL with minimal effort. I would actually prefer a lazy parser because it's easier to reason about, but that would have to be a different library and no way in hell am I porting my parser to a different library at this point.
  • 0
    You haven't misread the documentation, only explored and tested a new hypothesis
Add Comment