[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to main content

Matchete: Paths through the Pattern Matching Jungle

  • Conference paper
Practical Aspects of Declarative Languages (PADL 2008)

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

Included in the following conference series:

Abstract

Pattern matching is a programming language feature for selecting a handler based on the structure of data while binding names to sub-structures. By combining selection and binding, pattern matching facilitates many common tasks such as date normalization, red-black tree manipulation, conversion of XML documents, or decoding TCP/IP packets. Matchete is a language extension to Java that unifies different approaches to pattern matching: regular expressions, structured term patterns, XPath, and bit-level patterns. Matchete naturally allows nesting of these different patterns to form composite patterns. We present the Matchete syntax and describe a prototype implementation.

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

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Similar content being viewed by others

References

  1. Back, G.: DataScript: A specification and scripting language for binary data. In: Batory, D., Consel, C., Taha, W. (eds.) GPCE 2002. LNCS, vol. 2487, Springer, Heidelberg (2002)

    Chapter  Google Scholar 

  2. Benzaken, V., Castagna, G., Frisch, A.: CDuce: An XML-centric general-purpose language. In: International Conference on Functional Programming (ICFP) (2003)

    Google Scholar 

  3. Clark, J., DeRose, S.: XML path language (XPath) version 1.0. W3C recommendation, W3C (November 1999), http://www.w3.org/TR/1999/REC-xpath-19991116

  4. Diatchki, I.S., Jones, M.P., Leslie, R.: High-level views on low-level representations. In: International Conference on Functional Programming (ICFP) (2005)

    Google Scholar 

  5. Emir, B., Odersky, M., Williams, J.: Matching objects with patterns. In: Ernst, E. (ed.) ECOOP 2007. LNCS, vol. 4609, Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  6. Field, R.: JSR 45: Debugging Support for Other Languages, http://jcp.org

  7. Fisher, K., Gruber, R.: PADS: A domain-specific language for processing ad hoc data. In: Programming Language Design and Implementation (PLDI) (2005)

    Google Scholar 

  8. Gapeyev, V., Pierce, B.C.: Regular object types. In: Cardelli, L. (ed.) ECOOP 2003. LNCS, vol. 2743, Springer, Heidelberg (2003)

    Google Scholar 

  9. Gosling, J., Joy, B., Steele, G., Bracha, G.: The Java Language Specification, 2nd edn. Addison-Wesley, Reading (2000)

    Google Scholar 

  10. Grimm, R.: xtc (eXTensible C), http://cs.nyu.edu/rgrimm/xtc/

  11. Grimm, R.: Better extensibility through modular syntax. In: Programming Language Design and Implementation (PLDI) (2006)

    Google Scholar 

  12. Griswold, R., Poage, J.F., Polonsky, I.P.: The Snobol 4 Programming Language. Prentice-Hall, Englewood Cliffs (1971)

    Google Scholar 

  13. Guibas, L.J., Sedgewick, R.: A dichromatic framework for balanced trees. In: Foundations of Computer Science (FOCS) (1978)

    Google Scholar 

  14. Gustafsson, P., Sagonas, K.: Efficient manipulation of binary data using pattern matching. Journal on Functional Programming (JFP) (2006)

    Google Scholar 

  15. Harren, M., Raghavachari, M., Shmueli, O., Burke, M.G., Bordawekar, R., Pechtchanski, I., Sarkar, V.: XJ: Facilitating XML processing in Java. In: International World Wide Web Conferences (WWW) (2005)

    Google Scholar 

  16. Hosoya, H., Pierce, B.: XDuce: A statically typed XML processing language. Transactions on Internet Technology (TOIT) (2001)

    Google Scholar 

  17. Hudak, P., Peyton Jones, S.L., Wadler, P., Boutel, B., Fairbairn, J., Fasel, J.H., Guzmán, M.M., Hammond, K., Hughes, J., Johnsson, T., Kieburtz, R.B., Nikhil, R.S., Partain, W., Peterson, J.: Report on the programming language Haskell, a non-strict, purely functional language. SIGPLAN Notices 27(5), R1–R164 (1992)

    Google Scholar 

  18. Kirkegaard, C., Møller, A., Schwartzbach, M.I.: Static analysis of XML transformations in Java. IEEE Transactions on Software Engineering (TSE) (2004)

    Google Scholar 

  19. Lee, K., LaMarca, A., Chambers, C.: HydroJ: Object-oriented pattern matching for evolvable distributed systems. In: Object-Oriented Programming, Systems, Languages and Applciations (OOPSLA) (2003)

    Google Scholar 

  20. Liu, J., Myers, A.C.: JMatch: Iterable abstract pattern matching for Java. In: Dahl, V., Wadler, P. (eds.) PADL 2003. LNCS, vol. 2562, Springer, Heidelberg (2002)

    Google Scholar 

  21. Meijer, E., Beckman, B., Bierman, G.M.: LINQ: Reconciling objects, relations, and XML in the .NET framework. In: SIGMOD Industrial Track (2006)

    Google Scholar 

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

    Google Scholar 

  23. Moreau, P.-E., Ringeissen, C., Vittek, M.: A pattern matching compiler for multiple target languages. In: Hedin, G. (ed.) CC 2003 and ETAPS 2003. LNCS, vol. 2622, Springer, Heidelberg (2003)

    Google Scholar 

  24. Okasaki, C.: Purely Functional Data Structures. Cambridge University Press, Cambridge (1998)

    Google Scholar 

  25. Richard, A.J.: OOMatch: Pattern matching as dispatch in Java. Master’s thesis, University of Waterloo (2007)

    Google Scholar 

  26. Syme, D., Neverov, G., Margetson, J.: Extensible pattern matching via a lightweight language extension. In: International Conference on Functional Programming (ICFP) (2007)

    Google Scholar 

  27. Wadler, P.: Views: A way for pattern matching to cohabit with data abstraction. In: Principles of Programming Languages (POPL) (1987)

    Google Scholar 

  28. Wall, L.: Programming Perl. O’Reilly (1990)

    Google Scholar 

  29. Wright, A.K.: Pattern matching for Scheme. The match special form is part of PLT Scheme’s MzLib library (1996)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Paul Hudak David S. Warren

Rights and permissions

Reprints and permissions

Copyright information

© 2007 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Hirzel, M., Nystrom, N., Bloom, B., Vitek, J. (2007). Matchete: Paths through the Pattern Matching Jungle. In: Hudak, P., Warren, D.S. (eds) Practical Aspects of Declarative Languages. PADL 2008. Lecture Notes in Computer Science, vol 4902. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-77442-6_11

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-77442-6_11

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-77441-9

  • Online ISBN: 978-3-540-77442-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics