Skip to main content

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 5836))

Included in the following conference series:

Abstract

A simple grammar scheme for expressions containing mixfix operators is presented. The scheme is parameterised by a precedence relation which is only restricted to be a directed acyclic graph; this makes it possible to build up precedence relations in a modular way. Efficient and simple implementations of parsers for languages with user-defined mixfix operators, based on the grammar scheme, are also discussed. In the future we plan to replace the support for mixfix operators in the language Agda with a grammar scheme and an implementation based on this work.

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 54.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 69.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. Aasa, A.: Precedences in specifications and implementations of programming languages. Theoretical Computer Science 142(1), 3–26 (1995)

    Article  MathSciNet  MATH  Google Scholar 

  2. Aasa, A.: User Defined Syntax. PhD thesis, Chalmers University of Technology (1992)

    Google Scholar 

  3. The Agda Team. The Agda Wiki (2009), http://wiki.portal.chalmers.se/agda/

  4. Aho, A.V., Sethi, R., Ullman, J.D.: Compilers: Principles, Techniques, and Tools. Addison-Wesley, Reading (1986)

    MATH  Google Scholar 

  5. Allen, E., Chase, D., Hallett, J., Luchangco, V., Maessen, J.-W., Ryu, S., Steele Jr., G.L., Tobin-Hochstadt, S., et al.: The Fortress Language Specification, Version 1.0 (2008)

    Google Scholar 

  6. The Coq Development Team. The Coq Proof Assistant Reference Manual, Version 8.2 (2009)

    Google Scholar 

  7. Danielsson, N.A., Altenkirch, T.: Mixing induction and coinduction. Draft (2009)

    Google Scholar 

  8. Floyd, R.W.: Syntactic analysis and operator precedence. Journal of the ACM 10(3), 316–333 (1963)

    Article  MATH  Google Scholar 

  9. Frost, R.A., Szydlowski, B.: Memoizing purely functional top-down backtracking language processors. Science of Computer Programming 27(3), 263–288 (1996)

    Article  MathSciNet  MATH  Google Scholar 

  10. Goguen, J.A., Winkler, T., Meseguer, J., Futatsugi, K., Jouannaud, J.-P.: Introducing OBJ (1999)

    Google Scholar 

  11. Heinlein, C.: C+++: User-defined operator symbols in C++. In: INFORMATIK 2004 – Informatik verbindet, Band 2, Beiträge der 34. Jahrestagung der Gesellschaft für Informatik e.V (GI). Lecture Notes in Informatics, vol. P-51, pp. 459–468 (2004)

    Google Scholar 

  12. Lotfallah, W.B.: Characterizing unambiguous precedence systems in expressions without superfluous parentheses. International Journal of Computer Mathematics 86(1), 1–20 (2009)

    Article  MathSciNet  MATH  Google Scholar 

  13. McBride, C., Paterson, R.: Applicative programming with effects. Journal of Functional Programming 18, 1–13 (2008)

    Article  MATH  Google Scholar 

  14. Missura, S.A.: Higher-Order Mixfix Syntax for Representing Mathematical Notation and its Parsing. PhD thesis, ETH Zürich (1997)

    Google Scholar 

  15. Milner, R., Tofte, M., Harper, R., MacQueen, D.: The Definition of Standard ML. MIT Press, Cambridge (1997) (revised edition)

    Google Scholar 

  16. Norell, U.: Towards a practical programming language based on dependent type theory. PhD thesis, Chalmers University of Technology and Göteborg University (2007)

    Google Scholar 

  17. Norvig, P.: Techniques for automatic memoization with applications to context-free parsing. Computational Linguistics 17(1), 91–98 (1991)

    Google Scholar 

  18. Odersky, M.: The Scala Language Specification, Version 2.7. Programming Methods Laboratory, EPFL, Switzerland. Draft (2009)

    Google Scholar 

  19. Paulson, L.C., Nipkow, T., Wenzel, M.: The Isabelle Reference Manual (2008)

    Google Scholar 

  20. Pettersson, M., Fritzson, P.: A general and practical approach to concrete syntax objects within ML. In: Proceedings of the ACM SIGPLAN Workshop on ML and its Applications (1992)

    Google Scholar 

  21. Peyton Jones, S. (ed.): Haskell 98 Language and Libraries: The Revised Report. Cambridge University Press, Cambridge (2003)

    Google Scholar 

  22. Peyton Jones, S.L.: Parsing distfix operators. Communications of the ACM 29(2), 118–122 (1986)

    Google Scholar 

  23. Sterling, L., Shapiro, E.: The Art of Prolog, 2nd edn., Advanced Programming Techniques. MIT Press, Cambridge (1994)

    Google Scholar 

  24. Wadler, P.: How to replace failure by a list of successes; a method for exception handling, backtracking, and pattern matching in lazy functional languages. In: Jouannaud, J.-P. (ed.) FPCA 1985. LNCS, vol. 201, pp. 113–128. Springer, Heidelberg (1985)

    Chapter  Google Scholar 

  25. Wansbrough, K.: Macros and preprocessing in Haskell, unpublished manuscript (1999)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2011 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Danielsson, N.A., Norell, U. (2011). Parsing Mixfix Operators. In: Scholz, SB., Chitil, O. (eds) Implementation and Application of Functional Languages. IFL 2008. Lecture Notes in Computer Science, vol 5836. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-24452-0_5

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-24452-0_5

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-24451-3

  • Online ISBN: 978-3-642-24452-0

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics