Monadic parser combinators
In functional programming, a popular approach to building recursive descent parsers is to model parsers as functions, and to define higher-order functions (or combinators) that implement grammar constructions such as sequencing, choice, and repetition. Such parsers form an instance of a monad, an al...
| Main Authors: | , |
|---|---|
| Format: | Monograph |
| Published: |
School of Computer Science and IT
1996
|
| Online Access: | https://eprints.nottingham.ac.uk/237/ |
| _version_ | 1848790376448524288 |
|---|---|
| author | Hutton, Graham Meijer, Erik |
| author_facet | Hutton, Graham Meijer, Erik |
| author_sort | Hutton, Graham |
| building | Nottingham Research Data Repository |
| collection | Online Access |
| description | In functional programming, a popular approach to building recursive descent parsers is to model parsers as functions, and to define higher-order functions (or combinators) that implement grammar constructions such as sequencing, choice, and repetition. Such parsers form an instance of a monad, an algebraic structure from mathematics that has proved useful for addressing a number of computational problems. The purpose of this report is to provide a step-by-step tutorial on the monadic approach to building functional parsers, and to explain some of the benefits that result from exploiting monads. No prior knowledge of parser combinators or of monads is assumed. Indeed, this report can also be viewed as a first introduction to the use of monads in programming. |
| first_indexed | 2025-11-14T18:11:38Z |
| format | Monograph |
| id | nottingham-237 |
| institution | University of Nottingham Malaysia Campus |
| institution_category | Local University |
| last_indexed | 2025-11-14T18:11:38Z |
| publishDate | 1996 |
| publisher | School of Computer Science and IT |
| recordtype | eprints |
| repository_type | Digital Repository |
| spelling | nottingham-2372020-05-04T20:33:30Z https://eprints.nottingham.ac.uk/237/ Monadic parser combinators Hutton, Graham Meijer, Erik In functional programming, a popular approach to building recursive descent parsers is to model parsers as functions, and to define higher-order functions (or combinators) that implement grammar constructions such as sequencing, choice, and repetition. Such parsers form an instance of a monad, an algebraic structure from mathematics that has proved useful for addressing a number of computational problems. The purpose of this report is to provide a step-by-step tutorial on the monadic approach to building functional parsers, and to explain some of the benefits that result from exploiting monads. No prior knowledge of parser combinators or of monads is assumed. Indeed, this report can also be viewed as a first introduction to the use of monads in programming. School of Computer Science and IT 1996 Monograph NonPeerReviewed Hutton, Graham and Meijer, Erik (1996) Monadic parser combinators. Technical Report: NOTTCS-TR-96-4. School of Computer Science and IT, University of Nottingham. NOTTCS-TR-96-4 NOTTCS-TR-96-4 |
| spellingShingle | Hutton, Graham Meijer, Erik Monadic parser combinators |
| title | Monadic parser combinators |
| title_full | Monadic parser combinators |
| title_fullStr | Monadic parser combinators |
| title_full_unstemmed | Monadic parser combinators |
| title_short | Monadic parser combinators |
| title_sort | monadic parser combinators |
| url | https://eprints.nottingham.ac.uk/237/ https://eprints.nottingham.ac.uk/237/ |