Skip to main content Accessibility help

When Maybe is not good enough



Many variations upon the theme of parser combinators have been proposed, too many to list here, but the main idea is simple: A parser for phrases of type α is a function that takes an input string and produces results (x, rest), where x is a value of type α, and rest is the remainder of the input after the phrase with value x has been consumed. The results are often arranged into a list, because this allows a parser to signal failure with the empty list of results, an unambiguous success with one result, or multiple possibilities with a longer ‘list of successes’.



Hide All
Knuth, D. E. (1971) Top-down syntax analysis. Acta Inform. 1, 79110. Reprinted as Chapter 14 of Knuth (2003).
Knuth, D. E. (2003) Selected Papers on Computer Languages. Palo Alto, CA: CSLI.
McBride, C. & Paterson, R. (2008) Applicative programming with effects. J. Funct. Program. 18 (1), 113.
Sipser, M. F. (2005) Introduction to the Theory of Computation. 2nd ed.Boston, MA: Course Technology.


Full text views

Total number of HTML views: 0
Total number of PDF views: 0 *
Loading metrics...

Abstract views

Total abstract views: 0 *
Loading metrics...

* Views captured on Cambridge Core between <date>. This data will be updated every 24 hours.

Usage data cannot currently be displayed

When Maybe is not good enough

Submit a response


No Discussions have been published for this article.


Reply to: Submit a response

Your details

Conflicting interests

Do you have any conflicting interests? *