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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
Grappa is available at www.unibw.de/inf2/grappa.
- 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.
Homepage: www.unibw.de/inf2/DiaGen.
References
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)
Drewes, F., Hoffmann, B.: Contextual hyperedge replacement. Acta Inform. 52, 497–524 (2015)
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
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
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
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
Earley, J., Sturgis, H.: A formalism for translator interactions. Commun. ACM 13(10), 607–617 (1970)
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)
Franck, R.: A class of linearly parsable graph grammars. Acta Inform. 10(2), 175–201 (1978)
Habel, A.: Hyperedge Replacement: Grammars and Languages. LNCS, vol. 643. Springer, Heidelberg (1992). https://doi.org/10.1007/BFb0013875
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
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)
Minas, M.: Concepts and realization of a diagram editor generator based on hypergraph transformation. Sci. Comput. Program. 44(2), 157–180 (2002)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2018 Springer International Publishing AG
About this paper
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)