Analyzing Ambiguity of Context-Free Grammars
Open Access
- 9 January 2006
- journal article
- Published by Det Kgl. Bibliotek/Royal Danish Library in BRICS Report Series
- Vol. 13 (9)
- https://doi.org/10.7146/brics.v13i9.21965
Abstract
It has been known since 1962 that the ambiguity problem for context-free grammars is undecidable. Ambiguity in context-free grammars is a recurring problem in language design and parser generation, as well as in applications where grammars are used as models of real-world physical structures. However, the fact that the problem is undecidable does not mean that there are no useful approximations to the problem. We observe that there is a simple linguistic characterization of the grammar ambiguity problem, and we show how to exploit this to conservatively approximate the problem based on local regular approximations and grammar unfoldings. As an application, we consider grammars that occur in RNA analysis in bioinformatics, and we demonstrate that our static analysis of context-free grammars is sufficiently precise and efficient to be practically useful. Full text: http://dx.doi.org/10.1016/j.scico.2009.11.002Keywords
This publication has 0 references indexed in Scilit: