News for hackers. Stuff that matters.
Re:What the heck is a parser-combinator? by WorldMaker on Wednesday June 21, 2017 @11:49AM (#14604810)
It can certainly help to look at a parser-combinatory as a more rigorous, less artisanal/home-cooked recursive-descent parser. Good parser-combinators offer a lot more than just recursive-descent ways of looking at the parsing world, but if you are familiar with how you might do things in a recursive-descent way I think that familiarity can help in learning a parser-combinatory library.

For similar reasons, too, I think PEG-style grammars are more often conceptually closer than BNF grammars for early learning/thinking in parser-combinators. But again a good parser-combinator library will have power beyond what you might consider the possibility space afforded by just PEG-style grammars, especially as you start to get into higher order combinators.

Re:What the heck is a parser-combinator? by chubot on Wednesday June 21, 2017 @12:13PM (#14605058)
What's an example of something that can be recognized with parser combinator but not PEGs?

Do parser combinators have the notion of arbitrary lookahead or backtracking?

Re:What the heck is a parser-combinator? by louthy on Wednesday June 21, 2017 @02:57PM (#14606873)
Parser combinators can do look-ahead and backtracking, yes. You definitely pay for it in efficiency however (especially look-ahead).