Skip to main content
×
Home

When Maybe is not good enough

  • MICHAEL SPIVEY (a1)
Abstract

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’.

Copyright
References
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.
Recommend this journal

Email your librarian or administrator to recommend adding this journal to your organisation's collection.

Journal of Functional Programming
  • ISSN: 0956-7968
  • EISSN: 1469-7653
  • URL: /core/journals/journal-of-functional-programming
Please enter your name
Please enter a valid email address
Who would you like to send this to? *
×

Metrics

Full text views

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

Abstract views

Total abstract views: 110 *
Loading metrics...

* Views captured on Cambridge Core between September 2016 - 17th November 2017. This data will be updated every 24 hours.