Predictive Shift-Reduce Parsing for Hyperedge Replacement Grammars

Graph languages defined by hyperedge replacement grammars can be NP-complete. We study predictive shift-reduce (PSR) parsing for a subclass of these grammars, which generalizes the concepts of SLR(1) string parsing to graphs. PSR parsers run in linear space and time. In comparison to the predictive top-down (PTD) parsers recently developed by the authors, PSR parsing is more efficient and more general, while the required grammar analysis is easier than for PTD parsing.

[1]  Berthold Hoffmann,et al.  Cleaned SLL(1) Grammars are SLR(1) , 2017 .

[2]  Clemens Lautemann The complexity of graph languages generated by hyperedge replacement , 2004, Acta Informatica.

[3]  Berthold Hoffmann,et al.  Predictive Top-Down Parsing for Hyperedge Replacement Grammars , 2015, ICGT.

[4]  Annegret Habel,et al.  Hyperedge Replacement: Grammars and Languages , 1992, Lecture Notes in Computer Science.

[5]  Richard Edwin Stearns,et al.  Syntax-Directed Transduction , 1966, JACM.

[6]  Berthold Hoffmann,et al.  Contextual hyperedge replacement , 2011, Acta Informatica.

[7]  Berthold Hoffmann,et al.  Approximating Parikh Images for Generating Deterministic Graph Parsers , 2016, STAF Workshops.

[8]  Jacob Andreas,et al.  Parsing Graphs with Hyperedge Replacement Grammars , 2013, ACL.

[9]  Murray Hill,et al.  Yacc: Yet Another Compiler-Compiler , 1978 .

[10]  Reinhold Franck A class of linearly parsable graph grammars , 2004, Acta Informatica.

[11]  Andrzej Ehrenfeucht,et al.  On the membership problem for regular DNLC grammars , 1986, Discret. Appl. Math..

[12]  Donald E. Knuth,et al.  On the Translation of Languages from Left to Right , 1965, Inf. Control..

[13]  Manfred Kaul Practical Applications of Precedence Graph Grammars , 1986, Graph-Grammars and Their Application to Computer Science.

[14]  Genny Tortora,et al.  A Parsing Methodology for the Implementation of Visual Systems , 1997, IEEE Trans. Software Eng..

[15]  Walter Vogler,et al.  Recognizing Edge Replacement Graph Languages in Cubic Time , 1990, Graph-Grammars and Their Application to Computer Science.

[16]  Mark Minas Diagram editing with hypergraph parser support , 1997, Proceedings. 1997 IEEE Symposium on Visual Languages (Cat. No.97TB100180).

[17]  Frank Drewes Recognising k-Connected Hypergraphs in Cubic Time , 1993, Theor. Comput. Sci..

[18]  Franklin L. DeRemer,et al.  Simple LR(k) grammars , 1971, Commun. ACM.