A higher-order function that accepts several parsers as input and returns a new parser as output
In computer programming, a parser combinator is a higher-order function that accepts several parsers as input and returns a new parser as its output. In this context, a parser is a function accepting strings as input and returning some structure as output, typically a parse tree or a set of indices representing locations in the string where parsing stopped successfully. Parser combinators enable a recursive descent parsing strategy that facilitates modular piecewise construction and testing. This parsing technique is called combinatory parsing.
Parsers using combinators have been used extensively in the prototyping of compilers and processors for domain-specific languages such as natural-language interfaces to databases, where complex and varied semantic actions are closely integrated with syntactic processing. In 1989, Richard Frost and John Launchbury demonstrated[1] use of parser combinators to construct natural-language interpreters. Graham Hutton also used higher-order functions for basic parsing in 1992[2] and monadic parsing in 1996.[3] S. D. Swierstra also exhibited the practical aspects of parser combinators in 2001.[4] In 2008, Frost, Hafiz and Callaghan[5] described a set of parser combinators in Haskell that solve the long-standing problem of accommodating left recursion, and work as a complete top-down parsing tool in polynomial time and space.
^Frost & Launchbury 1989.
^Hutton 1992.
^Hutton, Graham; Meijer, Erik. "Monadic Parser Combinators" (PDF). University of Nottingham. Retrieved 13 February 2023. {{cite journal}}: Cite journal requires |journal= (help)
parsercombinator is a higher-order function that accepts several parsers as input and returns a new parser as its output. In this context, a parser is...
In computer science, a recursive descent parser is a kind of top-down parser built from a set of mutually recursive procedures (or a non-recursive equivalent)...
processor. Frost showed that basic memoized parsercombinators can be used as building blocks to construct complex parsers as executable specifications of CFGs...
notable startups have completed the Y Combinator Accelerator program. Mike Isaac described Y Combinator as: "Y Combinator accepts batches of start-ups twice...
grammar that contains left recursion cannot be parsed by a LL(k)-parser or other naive recursive descent parser unless it is converted to a weakly equivalent...
The Packrat parser is a type of parser that shares similarities with the recursive descent parser in its construction. However, it differs because it...
Haskell" Daan Leijen & Erik Meijer (2001). Parsec: Direct Style Monadic ParserCombinators for the Real World. Department of Computer Science, Universiteit Utrecht...
attended the Y Combinator program in 2006, launching Scribd. He went on to attend the Y Combinator program again in 2011, this time co-founding Parse, a platform...
non-interdefinable combinators. Jacobson interprets personal pronouns as the combinator I, and their binding is aided by a complex combinator Z, as in "Mary...
is an American entrepreneur and angel investor. He is a partner at Y Combinator in San Francisco, where he invests in and helps startups. Previously,...
parser XML validator a separate error-correcting parser for HTML pretty-printers for XML and HTML stream parser for XML events translator from DTD to Haskell...
combinatory logic using only the symbols 0 and 1. Using the S and K combinators, complex boolean algebra functions can be made. BCL has applications...
awakening – Vivid and convincing dream about awakening from sleep Fixed point combinator – Higher-order function Y for which Y f = f (Y f)Pages displaying short...
primitives and combinators than iteratees; conduit adapters for incremental functionalities such as parsing HTML, XML, generalised parsing, making HTTP...
used for pseudo-classes. Multiple simple selectors may be joined using combinators to specify elements by location, element type, id, class, or any combination...
that if the parser encounters a parse error during processing of a layout section, then it should try inserting a close brace (the "parse error" rule)...