Abstract
Real programming languages are often defined using ambiguous context-free grammars. Some ambiguity is intentional while other ambiguity is accidental. A good grammar development environment should therefore contain a static ambiguity checker to help the grammar engineer.
Ambiguity of context-free grammars is an undecidable property. Nevertheless, various imperfect ambiguity checkers exist. Exhaustive methods are accurate, but suffer from non-termination. Termination is guaranteed by approximative methods, at the expense of accuracy.
In this paper we combine an approximative method with an exhaustive method. We present an extension to the Noncanonical Unambiguity Test that identifies production rules that do not contribute to the ambiguity of a grammar and show how this information can be used to significantly reduce the search space of exhaustive methods. Our experimental evaluation on a number of real world grammars shows orders of magnitude gains in efficiency in some cases and negligible losses of efficiency in others.
Original language | English |
---|---|
Title of host publication | Proceedings of the Tenth Workshop on Language Descriptions, Tools and Applications (LDTA'10), March 28-29, 2010, Paphos, Cyprus |
Editors | C. Braband, P.-E. Morfeau |
Place of Publication | New York NY |
Publisher | Association for Computing Machinery, Inc |
Pages | 5/1-9 |
ISBN (Print) | 978-1-4503-0063-6 |
DOIs | |
Publication status | Published - 2010 |
Event | 10th Workshop on Language Descriptions, Tools and Applications (LDTA 2010) - Paphos, Greece Duration: 27 Mar 2010 → 28 Mar 2010 Conference number: 10 http://ldta.info/2010/ |
Workshop
Workshop | 10th Workshop on Language Descriptions, Tools and Applications (LDTA 2010) |
---|---|
Abbreviated title | LDTA 2010 |
Country/Territory | Greece |
City | Paphos |
Period | 27/03/10 → 28/03/10 |
Other | Workshop held as a satellite event of the 13th European Joint Conferences on Theory and Practice of Software (ETAPS 2010) |
Internet address |