Skip to main content

Parse Your Options

  • Chapter
The Beauty of Functional Code

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 8106))

  • 1181 Accesses

Abstract

We describe the development of a couple of combinators which can be used to run applicative style parsers in an interleaved way. In the presentation we advocate a scheme for choosing identifier names which clearly shows the types of the values involved, and how to compose them into the desired result. We finish with describing how the combinators can be used to parse command line arguments and files containing options.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 49.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Baars, A.I., Löh, A., Swierstra, S.D.: Parsing permutation phrases. J. Funct. Program. 14(6), 635–646 (2004)

    Article  MATH  Google Scholar 

  2. Claessen, K.: FUNCTIONAL PEARL Parallel Parsing Processes. Journal of Functional Programming 14(6), 741–757 (2004)

    Article  MATH  Google Scholar 

  3. Guerra, R., Baars, A.I., Swierstra, S.D., Saraiva, J.: Preserving order in non-order preserving parsers. Tech. Rep. UU-CS-2005-025, Department of Information and Computing Sciences, Utrecht University (2005)

    Google Scholar 

  4. McBride, C., Paterson, R.: Applicative programming with effects. Journal of Functional Programming 18(01), 1–13 (2007), http://portal.acm.org/citation.cfm?id=1348940.1348941

    MATH  Google Scholar 

  5. Swierstra, S.D., Duponcheel, L.: Deterministic, error-correcting combinator parsers. In: Launchbury, J., Sheard, T., Meijer, E. (eds.) AFP 1996. LNCS, vol. 1129, pp. 184–207. Springer, Heidelberg (1996)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2013 Springer-Verlag Berlin Heidelberg

About this chapter

Cite this chapter

Swierstra, D.S., Dijkstra, A. (2013). Parse Your Options. In: Achten, P., Koopman, P. (eds) The Beauty of Functional Code. Lecture Notes in Computer Science, vol 8106. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-40355-2_16

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-40355-2_16

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-40354-5

  • Online ISBN: 978-3-642-40355-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics