Formalization and correctness of predictive shift-reduce parsers for graph grammars based on hyperedge replacement - Drewes, Frank; Hoffmann, Berthold; Minas, Mark (Journal of logical and algebraic methods in programming, 2019)
Hyperedge replacement (HR) grammars can generate NP-complete graph languages, which makes parsing hard even for fixed HR languages. Therefore, we study predictive shift-reduce (PSR) parsing that yields efficient parsers for a subclass of HR grammars, by generalizing the concepts of SLR(1) string parsing to graphs. We formalize the construction of PSR parsers and show that it is correct. PSR parsers run in linear space and time, and are more efficient than the predictive top-down (PTD ) parsers recently developed by the authors. •Describes a predictive shift-reduce (PSR) parsing algorithm for a subclass of hyperedge replacement graph grammars.•Includes a correctness proof of the parsing algorithm.•PSR parsing needs worst case linear space and time and requires preprocessing that needs expected or worst case linear time.•PSR parsing has been implemented in the Grappa parser generator tool, available at www.unibw.de/inf2/grappa.