News for hackers. Stuff that matters.
Re:What the heck is a parser-combinator? by motet_a on Wednesday June 21, 2017 @08:58AM (#14603323)
I have the overall feeling that most people don’t realize that parser combinators are nothing more that disguized recursive descent parsers. Personally I love both.
Re:What the heck is a parser-combinator? by tel on Wednesday June 21, 2017 @09:00AM (#14603337)
They're not, though. They're a formal language for talking about all kinds of parsers. You can implement them as recursive descent if you want. You can also compile them into formal FSAs if you want.
Re:What the heck is a parser-combinator? by jhpriestley on Wednesday June 21, 2017 @09:18AM (#14603474)
Parser combinators are a quite general technique which has been applied to PEG parsing, Earley parsing, and many other specific algorithms. Recursive descent is common because it is easy to implement and allows the resulting combinators to form a Monad.