Generalized Predictive Shift-Reduce Parsing for Hyperedge Replacement Graph Grammars

  • Berthold Hoffmann
  • Mark MinasEmail author
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 11417)


Parsing for graph grammars based on hyperedge replacement (HR) is in general NP-hard, even for a particular grammar. The recently developed predictive shift-reduce (PSR) parsing is efficient, but restricted to a subclass of unambiguous HR grammars. We have implemented a generalized PSR parsing algorithm that applies to all HR grammars, and pursues severals parses in parallel whenever decision conflicts occur. We compare GPSR parsers with the Cocke-Younger-Kasami parser and show that a GPSR parser, despite its exponential worst-case complexity, can be much faster.


Hyperedge replacement grammar Graph parsing 


  1. 1.
    Chiang, D., Andreas, J., Bauer, D., Hermann, K.M., Jones, B., Knight, K.: Parsing graphs with hyperedge replacement grammars. In: Proceedings of the 51st Annual Meeting Association for Computational Linguistics, vol. 1, pp. 924–932 (2013)Google Scholar
  2. 2.
    Drewes, F., Hoffmann, B.: Contextual hyperedge replacement. Acta Inf. 52, 497–524 (2015)MathSciNetCrossRefGoogle Scholar
  3. 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). Scholar
  4. 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). Scholar
  5. 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). Scholar
  6. 6.
    Drewes, F., Hoffmann, B., Minas, M.: Formalization and correctness of predictive shift-reduce parsers for graph grammars based on hyperedge replacement. J. Log. Algebr. Meth. Program. (2018).
  7. 7.
    Groschwitz, J., Koller, A., Teichmann, C.: Graph parsing with s-graph grammars. In: Proceedings of the 53rd Annual Meeting Association for Computational Linguistics, ACL 2015, Volume 1: Long Papers, pp. 1481–1490. The Association for Computer Linguistics (2015)Google Scholar
  8. 8.
    Habel, A.: Hyperedge Replacement: Grammars and Languages. LNCS, vol. 643. Springer, Heidelberg (1992). Scholar
  9. 9.
    Knuth, D.E.: On the translation of languages from left to right. Inf. Control 8(6), 607–639 (1965)MathSciNetCrossRefGoogle Scholar
  10. 10.
    Lautemann, C.: The complexity of graph languages generated by hyperedge replacement. Acta Inf. 27, 399–421 (1990)MathSciNetCrossRefGoogle Scholar
  11. 11.
    Minas, M.: Concepts and realization of a diagram editor generator based on hypergraph transformation. Sci. Comput. Program. 44(2), 157–180 (2002)CrossRefGoogle Scholar
  12. 12.
    Tomita, M.: An efficient context-free parsing algorithm for natural languages. In: Proceedings of the 9th International Joint Conference on Artificial Intelligence, pp. 756–764. Morgan Kaufmann (1985)Google Scholar

Copyright information

© Springer Nature Switzerland AG 2019

Authors and Affiliations

  1. 1.Universität BremenBremenGermany
  2. 2.Universität der Bundeswehr MünchenNeubibergGermany

Personalised recommendations