Still easily implemented with combinators the whole way down. It’s building an ast, that’s it. Once you have a tree, you can do whatever you want with the result before passing it to a compiler for a language. Here though, just serialization stuff.
Ah, I see. I can't reply to that thread anymore, but it sounds like a combinator is like a first-class YACC grammar in the functional language that obviates the need to write the parser. That's really cool, thanks. I'll read up on it more.
A functional programming technique that allow you to declaratively define your language when using parsers as values. If you have a good functional language implementation, the code look very similar to someone able to read BNF. And then you run it, and get out an AST the back end.
edit: Forgot partial application. Not strictly required, but super handy.
SavantIdiot|4 years ago
a_lost_needle|4 years ago
Edit: It’s not that accurate. It’s just math used in a way to compose parsers using parsers.
SavantIdiot|4 years ago
I'm dense: what's a combinator?
a_lost_needle|4 years ago
edit: Forgot partial application. Not strictly required, but super handy.