Skip to main content

Generating Efficient Predictive Shift-Reduce Parsers for Hyperedge Replacement Grammars

  • Conference paper
  • First Online:
Software Technologies: Applications and Foundations (STAF 2017)

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

  • 889 Accesses

Abstract

Predictive shift-reduce (PSR) parsing for a subclass of hyperedge replacement graph grammars has recently been devised by Frank Drewes and the authors. This paper describes in detail how efficient PSR parsers are generated with the Grappa parser generator implemented by Mark Minas. Measurements confirm that the generated parsers run in linear time.

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 EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.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

Notes

  1. 1.

    Grappa is available at www.unibw.de/inf2/grappa.

  2. 2.

    As a worst case, a single lookup can take linear time in the number of hash table entries when the hash function produces too many collisions. However, the parser has to look up all edges. The overall lookup time, therefore, tends towards the average case.

  3. 3.

    Homepage: www.unibw.de/inf2/DiaGen.

References

  1. Courcelle, B., Engelfriet, J.: Graph Structure and Monadic Second-Order Logic - A Language-Theoretic Approach. Encyclopedia of Mathematics and its Applications, vol. 138. Cambridge University Press, Cambridge (2012)

    Google Scholar 

  2. Drewes, F., Hoffmann, B.: Contextual hyperedge replacement. Acta Inform. 52, 497–524 (2015)

    Article  MathSciNet  MATH  Google Scholar 

  3. Drewes, F., Hoffmann, B., Minas, M.: Contextual hyperedge replacement. In: Schürr, A., Varró, D., Varró, G. (eds.) AGTIVE 2011. LNCS, vol. 7233, pp. 182–197. Springer, Heidelberg (2012). https://doi.org/10.1007/978-3-642-34176-2_16

    Chapter  Google Scholar 

  4. Drewes, F., Hoffmann, B., Minas, M.: Predictive top-down parsing for hyperedge replacement grammars. In: Parisi-Presicce, F., Westfechtel, B. (eds.) ICGT 2015. LNCS, vol. 9151, pp. 19–34. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-21145-9_2

    Chapter  Google Scholar 

  5. Drewes, F., Hoffmann, B., Minas, M.: Approximating Parikh images for generating deterministic graph parsers. In: Milazzo, P., Varró, D., Wimmer, M. (eds.) STAF 2016. LNCS, vol. 9946, pp. 112–128. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-50230-4_9

    Chapter  Google Scholar 

  6. Drewes, F., Hoffmann, B., Minas, M.: Predictive shift-reduce parsing for hyperedge replacement grammars. In: de Lara, J., Plump, D. (eds.) ICGT 2017. LNCS, vol. 10373, pp. 106–122. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-61470-0_7

    Chapter  Google Scholar 

  7. Earley, J., Sturgis, H.: A formalism for translator interactions. Commun. ACM 13(10), 607–617 (1970)

    Article  MATH  Google Scholar 

  8. Engelfriet, J., Rozenberg, G.: Node replacement graph grammars. In: Rozenberg, G. (ed.) Handbook of Graph Grammars and Computing by Graph Transformation. Foundations, vol. I, Chap. 1, pp. 1–94. World Scientific, Singapore (1997)

    Google Scholar 

  9. Franck, R.: A class of linearly parsable graph grammars. Acta Inform. 10(2), 175–201 (1978)

    Article  MathSciNet  MATH  Google Scholar 

  10. Habel, A.: Hyperedge Replacement: Grammars and Languages. LNCS, vol. 643. Springer, Heidelberg (1992). https://doi.org/10.1007/BFb0013875

    MATH  Google Scholar 

  11. Kaul, M.: Practical applications of precedence graph grammars. In: Ehrig, H., Nagl, M., Rozenberg, G., Rosenfeld, A. (eds.) Graph Grammars 1986. LNCS, vol. 291, pp. 326–342. Springer, Heidelberg (1987). https://doi.org/10.1007/3-540-18771-5_62

    Chapter  Google Scholar 

  12. Minas, M.: Diagram editing with hypergraph parser support. In: Proceedings of 1997 IEEE Symposium on Visual Languages (VL 1997), Capri, Italy, pp. 226–233. IEEE Computer Society Press (1997)

    Google Scholar 

  13. Minas, M.: Concepts and realization of a diagram editor generator based on hypergraph transformation. Sci. Comput. Program. 44(2), 157–180 (2002)

    Article  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Mark Minas .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2018 Springer International Publishing AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Hoffmann, B., Minas, M. (2018). Generating Efficient Predictive Shift-Reduce Parsers for Hyperedge Replacement Grammars. In: Seidl, M., Zschaler, S. (eds) Software Technologies: Applications and Foundations. STAF 2017. Lecture Notes in Computer Science(), vol 10748. Springer, Cham. https://doi.org/10.1007/978-3-319-74730-9_7

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-74730-9_7

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-74729-3

  • Online ISBN: 978-3-319-74730-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics