Abstract

Precedence graph grammars are of major interest in all those applications of graph grammars, where highly efficient parsers are needed. Up to now there are no other graph parsers with the same performance. Due to the fact, that even regular graph grammars with very restricted embedding relations have a NP-complete membership problem, different kinds than Chomsky-like restrictions have to be imposed on graph grammars. We start with contextfree graph grammars and introduce precedence relations. By demanding conflictfreeness, unique invertibility and some further, more technical constraints, precedence graph grammars are introduced with an O(n2) — membership problem, where n ist the number of nodes of the input graph.Precedence graph grammars are unambiguous, which is especially important for semantic evaluation of the derivation trees. In this paper we show, that in spite of all constraints the proposed graph grammar class has interesting generative power, concerning applications in such areas as e.g. dynamic data structures, program graphs, data and control flow graphs and syntactic pattern recognition. For the last topic an error correcting facility incorporated into the precedence graph parser is of special interest. In general inexact graph matching is NP-complete. In this paper we present a method, that increases the time complexity of our parser only by a factor of n. At last, our method is demonstrated with an example from syntactic pattern recognition.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call