News for hackers. Stuff that matters.
Re:What the heck is a parser-combinator? by vorg on Wednesday June 21, 2017 @07:40AM (#14602803)
> monadic combinators are more powerful [than context free parsers]

Monadic parsers can do context-sensitive things that context free parsers can't, but they can't have unordered options which context free parsers can. So really monadic parsers have different powers to context-free.

> do monads warn the user when there is an ambiguity in the "grammar"?

You don't have ambiguity in the grammar because monadic parsers only provide ordered options.

Re:What the heck is a parser-combinator? by dozzie on Wednesday June 21, 2017 @08:46AM (#14603238)
> You don't have ambiguity in the grammar because monadic parsers only provide ordered options.

Oh, but you do have ambiguity in the grammar, except that parser returns one of the possible parse trees deterministically and thus doesn't warn you that the input could be parsed differently. This leads to the false impression that your grammar is unambiguous.

Re:What the heck is a parser-combinator? by marcosdumay on Wednesday June 21, 2017 @02:02PM (#14606322)
The parser implements an unambiguous grammar. But it may not be the grammar you were thinking it was.

Specifically, it makes it impossible for you to even write down that ambiguous grammar you wanted.