top | item 29257564

(no title)

a_lost_needle | 4 years ago

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.

discuss

order

SavantIdiot|4 years ago

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_lost_needle|4 years ago

Yea, that’s pretty accurate. So now I’m curious what you thought the site was named after?

Edit: It’s not that accurate. It’s just math used in a way to compose parsers using parsers.

SavantIdiot|4 years ago

Like grandma used to say: "There's nothing combinators can't solve. Except consumption. Rest in peace Grandpa Neddie."

I'm dense: what's a combinator?

a_lost_needle|4 years ago

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.