Article contents
When Maybe is not good enough
Published online by Cambridge University Press: 10 September 2012
Extract
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’.
- Type
- Functional Pearl
- Information
- Copyright
- Copyright © Cambridge University Press 2012
References
- 4
- Cited by
Discussions
No Discussions have been published for this article.