Is there a "grammar/pattern/algebra of parser comb...
# thinking-together
m
Is there a "grammar/pattern/algebra of parser combinators" somewhere? Something that describe the common parts that most parser combinators have, choice, iteration and so on
g
A: PEG but... DSL for parsing == Ohm-JS. Ohm-JS >> PEG >> parsing combinators (IMO) older DSL for parsing == S/SL (Syntax / Semantic Language), superseded by PEG [SSL and PT compiler](https://research.cs.queensu.ca/home/cordy/pub/downloads/ssl/) [Ohm-JS](https://ohmjs.org) [PEG](https://en.wikipedia.org/wiki/Parsing_expression_grammar) (fyi, you might use Ohm to create source code for parsing combinators in any target language, not just JS)
👍 1
c
My favourite parser combinator implementation. You can optionally give it a grammar, and it will build the combinators for you. Very easy to use: https://github.com/orangeduck/mpc
j
There are monadic parser combinators. http://www.cs.nott.ac.uk/~pszgmh/monparsing.pdf Walks through combinators that are pretty common
👍 1
w
Ohm has an especially nice feel to it.