Formalization and correctness of predictive shift-reduce parsers for graph grammars based on hyperedge replacement

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 par...

Full description

Saved in:
Bibliographic Details
Published inJournal of logical and algebraic methods in programming Vol. 104; pp. 303 - 341
Main Authors Drewes, Frank, Hoffmann, Berthold, Minas, Mark
Format Journal Article
LanguageEnglish
Published Elsevier Inc 01.04.2019
Subjects
Online AccessGet full text

Cover

Loading…
More Information
Summary: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.
ISSN:2352-2208
2352-2216
DOI:10.1016/j.jlamp.2018.12.006