Skip to main content

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

Included in the following conference series:

  • 609 Accesses

Abstract

A graph language can be described by a graph grammar in a manner similar to a string grammar known from the theory of formal languages. Unfortunately, graph parsing is known to be computationally expensive in general. There are quite simple graph languages that crush most general-purpose graph parsers.

In this paper we present graph parser combinators, a new approach to graph parsing inspired by the well-known string parser combinators. The basic idea is to define primitive graph parsers for elementary graph components and a set of combinators for the construction of more advanced graph parsers. Using graph parser combinators special-purpose graph parsers can be composed conveniently. Thereby, language-specific performance optimizations can be incorporated in a flexible manner.

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 74.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 99.00
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. Minas, M.: Concepts and realization of a diagram editor generator based on hypergraph transformation. Science of Computer Programming 44(2), 157–180 (2002)

    Article  MATH  Google Scholar 

  2. Kasami, T.: An efficient recognition and syntax analysis algorithm for context free languages. Scientific Report AF CRL-65-758, Air Force Cambridge Research Laboratory, Bedford, Massachussetts (1965)

    Google Scholar 

  3. Drewes, F., Habel, A., Kreowski, H.J.: Hyperedge replacement graph grammars. In: Rozenberg, G. (ed.) Handbook of Graph Grammars and Computing by Graph Transformation. Foundations, vol. I, pp. 95–162. World Scientific, Singapore (1997)

    Google Scholar 

  4. Hutton, G., Meijer, E.: Monadic parser combinators. Technical Report NOTTCS-TR-96-4, Department of Computer Science, University of Nottingham (1996)

    Google Scholar 

  5. Johnson, S.C.: Yacc: Yet another compiler compiler. Technical Report 32, Bell Laboratories, Murray Hill, New Jersey (1975)

    Google Scholar 

  6. Wallace, M.: PolyParse (2007), http://www.cs.york.ac.uk/fp/polyparse/

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

    Google Scholar 

  8. Citrin, W., Hall, R., Zorn, B.: Programming with visual expressions. In: Haarslev, V. (ed.) Proc. 11th IEEE Symp. Vis. Lang, pp. 294–301. IEEE Computer Soc. Press, Los Alamitos (1995)

    Google Scholar 

  9. Minas, M.: Hypergraphs as a uniform diagram representation model. In: Ehrig, H., Engels, G., Kreowski, H.-J., Rozenberg, G. (eds.) TAGT 1998. LNCS, vol. 1764, pp. 281–295. Springer, Heidelberg (2000)

    Google Scholar 

  10. Erwig, M.: Inductive graphs and functional graph algorithms. J. Funct. Program. 11(5), 467–492 (2001)

    Article  MATH  MathSciNet  Google Scholar 

  11. Leijen, D., Meijer, E.: Parsec: Direct style monadic parser combinators for the real world. Technical Report UU-CS-2001-27, Dept. of Comp. Science, Universiteit Utrecht (2001)

    Google Scholar 

  12. Gill, A., Marlow, S.: Happy - the parser generator for Haskell, http://www.haskell.org/happy

  13. King, D.: Functional Programming and Graph Algorithms. PhD thesis, University of Glasgow (1996)

    Google Scholar 

  14. Erwig, M.: FGL - A Functional Graph Library, http://web.engr.oregonstate.edu/~erwig/fgl/haskell/

  15. Erwig, M.: A functional homage to graph reduction. Technical Report 239, FernUniversität Hagen (1998)

    Google Scholar 

  16. Schneider, H.J.: Graph transformations - an introduction to the categorical approach (2007), http://www2.cs.fau.de/~schneide/gtbook/

  17. Kahl, W., Schmidt, G.: Exploring (finite) Relation Algebras using Tools written in Haskell. Technical Report 2000-02, Fakultät für Informatik, Universität der Bundeswehr, München (2000)

    Google Scholar 

  18. Swierstra, S.D., Azero Alcocer, P.R.: Fast, error correcting parser combinators: a short tutorial. In: Pavelka, J., Tel, G., Bartosek, M. (eds.) SOFSEM 1999. LNCS, vol. 1725, pp. 111–129. Springer, Heidelberg (1999)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Olaf Chitil Zoltán Horváth Viktória Zsók

Rights and permissions

Reprints and permissions

Copyright information

© 2008 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Mazanek, S., Minas, M. (2008). Graph Parser Combinators. In: Chitil, O., Horváth, Z., Zsók, V. (eds) Implementation and Application of Functional Languages. IFL 2007. Lecture Notes in Computer Science, vol 5083. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-85373-2_1

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-85373-2_1

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-85372-5

  • Online ISBN: 978-3-540-85373-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics