• balsoft@lemmy.ml
    link
    fedilink
    arrow-up
    1
    ·
    12 days ago

    I can’t go back to parsers with grammar definitions after using parser combinators; it just feels so unelegant and verbose. I guess Rust doesn’t have monadic syntax sugar like more functional languages, so it makes parsers in Nom a bit more ugly than Parsec, but I still prefer it.

    • TehPers@beehaw.org
      link
      fedilink
      English
      arrow-up
      2
      ·
      12 days ago

      Normally I agree, but I found that Pest’s grammar definitions double as documentation on the language syntax. Nom is much more ergonomic though.