3 ms·
Notably, you hardly ever need Monadic parser combinators. Applicative parser combinators work fine in almost all cases. FastParse lets you use parser combinato
by lihaoyi 9y ago
Notably, you hardly ever need Monadic parser combinators. Applicative parser combinators work fine in almost all cases.
FastParse lets you use parser combinators monadically, but that's only necessary in uncommon cases. The three I've come across are length + data-of-length constructs (more common in binary parsing than text), having your parser validate matched XML tags/closing-tags, and indentation-delimited-block parser (e.g. when parsing Python).
For the vast majority of programming-language-like things, Applicative parser combinators are enough, including languages with complex syntax such as Scala.