Practical applications of precedence graph grammars
Autor: | Manfred Kaul |
---|---|
Rok vydání: | 1987 |
Předmět: | |
Zdroj: | Lecture Notes in Computer Science ISBN: 9783540187714 Graph-Grammars and Their Application to Computer Science |
DOI: | 10.1007/3-540-18771-5_62 |
Popis: | 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. |
Databáze: | OpenAIRE |
Externí odkaz: |